Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
Solved

# Division by zero

Posted on 2011-03-08
Medium Priority
885 Views
Hi All!

I continue to get a division by zero error even though the syntax check says "no errors".  I've been starting at it and just can't seem to find out how to fix this issue:

Here is the formula:

If (Previous({Draw_Information.Net Sales Total})-{Draw_Information.Net Sales Total})=0
then 0
else ({Draw_Information.Net Sales Total})/{Draw_Information.Net Sales Total}-(Previous({Draw_Information.Net Sales Total}))*100

spudmcc
0
Question by:spudmcc
[X]
###### Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

• Help others & share knowledge
• Earn cash & points
• 2

Author Comment

ID: 35075596
Sorry--pasted wrong formula

If (Previous({Draw_Information.Net Sales Total})-{Draw_Information.Net Sales Total})=0
then 0
else ((Previous({Draw_Information.Net Sales Total})-{Draw_Information.Net Sales Total})/{Draw_Information.Net Sales Total})*100
0

LVL 12

Accepted Solution

JayConverse earned 2000 total points
ID: 35075611
You should be checking the denominator:

If ({Draw_Information.Net Sales Total})=0
then 0
else ((Previous({Draw_Information.Net Sales Total})-{Draw_Information.Net Sales Total})/{Draw_Information.Net Sales Total})*100
0

Author Closing Comment

ID: 35075807
Thank you so much for the 2nd set of eyes.  It was driving me crazy.  I so very much appreciate your quick response, knowledge and time.

spudmcc (Andy)
0

## Featured Post

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There have always been a lot of questions related to when Crystal Reports evaluates report components (such as formulas, summaries, cross-tabs, charts, to name a few examples). Crystal Reports uses a two-pass reporting process to provide greater …
Jaspersoft Studio is a plugin for Eclipse that lets you create reports from a datasource.  In this article, we'll go over creating a report from a default template and setting up a datasource that connects to your database.
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
###### Suggested Courses
Course of the Month7 days, 16 hours left to enroll