Jun 2 2008, 01:27 PM
I have created a calculation in a report. There are some records which are dividing by zero. Since division by zero is impossible, it is returning #Div/0! for those records. Is there a way I can make those records show with nothing in the report (Instead of #Div/0!). I thought I might be able to do conditional formatting, but I have not had luck with it.
Jun 2 2008, 01:30 PM
It would help to see your code, but should be something like this:
=IIf([Field1]=0, 0, [Field2]/IIf([Field1]=0,1,[Field1]))
Hope that helps...
Jun 2 2008, 01:43 PM
Here is my calculation:
=([Total Of Billed PM]/([SumOfTotal EFM]/[Duration]))/[Project Months]
Where project months can be zero (thus creating the #Div/0). Can I add an if statement to this calculation?
Jun 2 2008, 01:51 PM
Yes, just substitute the [Project Months] bit in the IF test, and your formula in the FALSE section of the test.
=Iif([Project Months]=0,0,([Total Of Billed PM]/([SumOfTotal EFM]/[Duration]))/[Project Months])
Basically, this says, "If the Project Months field is zero, then just display a zero. Otherwise, display the result of a calculation."
Hope this helps,
Jun 2 2008, 02:08 PM
Wow that worked like a charm! Thanks bunches!
Jun 2 2008, 02:39 PM
You're welcome. Dennis and I are happy to help. Good luck with your project.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here