How do I add calculated value as a group in a pie chart using SSRS?

69 Views Asked by At

I'm trying to understand how to plot data to a pie chart using calculations versus grouping.

I've tried series and category grouping:

=Switch(Left(Trim(Fields!WaybillNumber.Value),2) = "SA", "SA", 
Left(Trim(Fields!WaybillNumber.Value),2) = "JU", "JU")
1

There are 1 best solutions below

0
Strawberryshrub On

The easiest way would be if you add a calculated field in your dataset with your expression,

=Switch(Left(Trim(Fields!WaybillNumber.Value),2) = "SA", "SA", 
        Left(Trim(Fields!WaybillNumber.Value),2) = "JU", "JU")

and then simply drag and drop your calculated field into the pie chart.