I currently have indicators throughout a report based on the comparison of two cells.
Example: | Indicator | Score 1 | Score 2 | |Green Arrow | 5 | 3 | | Red Arrow | 2 | 4 | |Yellow Line | 10 | 10 |
My goal is to show at the end of the report how many green arrows, red arrows, and yellow lines. How would I be able to display the count of the arrows?
Try this:
For Green Arrows
=Sum(IIF(Fields!Score1.Value>Fields!Score2.Value,1,0))
For Red
=Sum(IIF(Fields!Score1.Value<Fields!Score2.Value,1,0))
For Yellow
=Sum(IIF(Fields!Score1.Value=Fields!Score2.Value,1,0))
The Sum
function sums by one every time it finds that Score1
is greater than Score2
for the green arrows case.
Let me know if this helps.