0
votes

I have an SSRS report generating KPIs. Each KPI is measured from 0%-100%, where the goals for Red (bad)/Yellow/Green (best) vary between KPIs. Some may give green for 40%, and some others may require 95%.

The images that display next to the KPI are already coded to be conditional on the value of the KPI itself. For one example:

=Iif(
ReportItems!LaborEntry.Value >= 0.95,
"Green",
Iif(
    ReportItems!LaborEntry.Value >= 0.85,
    "Yellow",
    "Red"
    )
)

Where "Green," "Yellow," and "Red" are the images in the report which correspond to the values.

NOW, here's the question: how would I count up how many greens are in my report, for example? I need to be able to score them, but I don't necessarily know at run-time what each image will be.

1
You could potentially use something like SUM(IIF(Fields!YourField > n, 1, 0)) - BJones

1 Answers

1
votes

Nested calculations can get messy. When you encounter a situation like this, it usually makes sense to create a calculated field on your dataset. In this case, make your IIf statement a calculated field. This simplifies the expression to select an image. And of course it is trivial to simply aggregate your new column!