0
votes

I have an expression in a (SSRS) table:

=IIF(fields!date1.value

which works fine and either 'yes' or 'no' appears next to the date value column.

This is a drill-down in a report, and when opened runs about 70 rows down, depending on the date parameters.

I want now to add a text box (or row-total to my report) that shows a total of the no's and the yes's. I also want to work out as a % how many no's there were against a total of all the dates.

Can you please suggest an expression I could use to do this?

Thanks

1

1 Answers

0
votes

I would suggest that you handle all the calculations in your sql query rather, the summaries you can do using a Common table expression before returning your results by adding the calculated result to your results. then you can just access the data column to get the value, using summary calculations is much faster in sql than in ssrs.

Otherwise you can accomplish this like so if i understand your expression correctly.

=sum(iif(fields!date1.value = "yes", 1, 0)) for 'yes'
=sum(iif(fields!date1.value = "no", 1, 0)) for 'no'

=(sum(iif(fields!date1.value = "no", 1, 0)) / CountRows("MyDataset")) * 100 for total