Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Division by Zero Error - Not sure how to fix this 1

Status
Not open for further replies.

Jeffs1977

Programmer
Joined
Apr 13, 2009
Messages
6
Location
US
My formula:
Code:
{Data.Fee2}-{Data.Fee1}/{Data.Fee1}

When I run my report, I get a "Division by Zero" error. Can anyone assist me? Not sure what I need to do to fix this.
 
Would this be correct?

IF {Data.Fee1} = 0 then 0 else {Data.Fee2}/{Data.Fee1}
 
That fixed my Division by Zero issue, but I think I need help on my formulas.

I have 4 columns on my report

Fee 1
Fee 2
Fee Difference
% Change

The formula I used for my %Change was the one that created the "Division by Zero" error.

In looking at my data retuned, I have one like this:

Fee 1 = $200.00
Fee 2 = $385.00
Fee Difference = $185.00
% Change = 1.93%

I think I need help on my %Change formula. What would be the best way to report back a % diffence between Fee 1 and Fee 2?
 
If {Data.Fee1} <> 0 then
({Data.Fee2}-{Data.Fee1})%{Data.Fee1}

-LB
 
lbass -

Thank you so much. I really appreciate the help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top