Quantcast
Channel: SQL Server Reporting Services
Viewing all articles
Browse latest Browse all 1418

Calc percent gives #Error

$
0
0

We have an SSRS report with totals comparing current month to prior month and showing a percentage (+ or -) of change from prior month.  It is occurring in the total rows summarizing group and grand totals.  I have tried both of the expressions below and both give #Error when the prior month is zero. It works perfect if totals are > 0 or < 0 but not zero.

=IIf(ReportItems!Textbox145.Value <> 0,((ReportItems!Textbox142.Value - ReportItems!Textbox145.Value) / ReportItems!Textbox145.Value),1)

=IIf(Sum(Fields!PriorAmount.Value) <> 0,((Sum(Fields!CurrentAmount.Value) - Sum(Fields!PriorAmount.Value)) / Sum(Fields!PriorAmount.Value)),1)

Textbox 145 is the prior total and Textbox142 is the current total.


Viewing all articles
Browse latest Browse all 1418

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>