Formatting percents w/no value in report

  • Thread starter Thread starter Elizabeth
  • Start date Start date
E

Elizabeth

I have a report that shows the percent of monthx out of a
yearx. However, in one year, year x = 0, so each month is
also zero. 0/0 is an undefined number. How would I
change the report so that in the space where error is
shown could I show something else, like text?

Thanks!
 
Elizabeth said:
I have a report that shows the percent of monthx out of a
yearx. However, in one year, year x = 0, so each month is
also zero. 0/0 is an undefined number. How would I
change the report so that in the space where error is
shown could I show something else, like text?


You can test for that in a text box's expression:

=IIf(yearx = 0, "N/A", monthx / yearx)
 
Thanks, it worked!!!
-----Original Message-----



You can test for that in a text box's expression:

=IIf(yearx = 0, "N/A", monthx / yearx)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top