reporting-servicesssrs-2008-r2ssrs-tablixreportbuilder3.0report-builder2.0

SSRS adding a percentage column based on a specifc column category in a matrix/tablix


I have a matrix/tablix set up so there are 4 row groups going down the left-hand side and a column group called RegCompCategory:

enter image description here

When the report is run, the RegCompCategory column group produces 3 distinct columns based on the categories in the underlying data:

enter image description here

What I'd like to do is add another column before the RegCompCategory column group that will display a percentage of the "fully-marked" column against the "total" column:

enter image description here

I'm guessing I will need to write an expression for the fields highlighted above, but I'm not sure how to reference the RegCompCategory to identify specifically the "Fully-Marked" category of data.

Could someone give me a few pointers? Many thanks.


Solution

  • Try:

    =Count(IIF(Fields!RegCompCategory.Value="Fully-Market",Fields!RegCompCategory.Value,Nothing))
    /
    Count(Fields!RegCompCategory.Value)
    

    It will count the number of Fully-Market rows and divide by the total rows. I think that is what you are expecting.

    Let me know if this helps you.