3 Replies Latest reply on Sep 18, 2016 12:24 PM by greengk2fi

    Hide ? on Layout When Dividing by Zero


      I am calculating % change on a report. The simple calculation below works just fine.


      Screen Shot 2016-09-12 at 12.34.24 PM.png


      Occasionally there is a zero for the previous period and thus the % change is incalculable because we can't divide by zero. When that happens, the report shows ? for that line. I thought there must be a way to hide the question mark on the report. I've tried using the Hide Object when there is an evaluation error; but I'm not having success. I'm not sure the I'm using EvaluateError correctly.

      Screen Shot 2016-09-12 at 12.43.18 PM.png


      Any ideas on hiding ? for percentages on lines that are dividing by zero?  Thanks so much.

        • 1. Re: Hide ? on Layout When Dividing by Zero
          David Moyer


          the Hide Object condition would be

          Not GetSummary(the one in the denominator)

          p.s. you can make this more efficient by changing your calculation to use the Let statement and the "" (empty string).


            den = GetSummary(the one in the denominator);

            If ( den > 0 ;

              the numerator / den ;

              "" )


          1 of 1 people found this helpful
          • 2. Re: Hide ? on Layout When Dividing by Zero

            Thanks so much!

            • 3. Re: Hide ? on Layout When Dividing by Zero

              Thanks again for your previous help. That did work wonderfully for most of my report. However, I've got an issue where a the calculation in a contributing field can come up as incalculable. So when it is used in the next calculation, it reports ?  I've tried a few things but can't seem to get it going.


              For example, the growth of average $ per service causes this issue. If there hasn't been a sale of that item in the previous year, then the calc for for that year's $ per service will come up with an issue due to dividing by zero. When this calculation is used as part of the difference between two years, obviously it returns ? but not because of the previous denominator. So I'm back to wondering if there is an "incalculable" calculation that would allow me to hide the field when a cal field is incalculable. Any other ideas?


              Screen Shot 2016-09-18 at 3.06.08 PM.png