I have this code to calcuate the percent:
%Sale: IIf([n]=0,"demoniator is 0",Format([#Sale]/[n],"Percent"))
This code works well, but the result of the percentage is 2 decimal (like 59.69%). How can I eliminate the decimal to 0 or 1 (like 59.7%). I tried to just calcuate the rate as RateSale: (#Sale]/[n]), then select format as percent with 1 decimal number in the report template. But when n= 0, it shows as #Error# in report and I do not want this.
could someone please help?
thanks,
bluemoon
%Sale: IIf([n]=0,"demoniator is 0",Format([#Sale]/[n],"Percent"))
This code works well, but the result of the percentage is 2 decimal (like 59.69%). How can I eliminate the decimal to 0 or 1 (like 59.7%). I tried to just calcuate the rate as RateSale: (#Sale]/[n]), then select format as percent with 1 decimal number in the report template. But when n= 0, it shows as #Error# in report and I do not want this.
could someone please help?
thanks,
bluemoon
Comment