I am trying to sum a column in a group footer.
The column calculates the revenue made from each customer for the month.
The revenue for each customer gets calculated by the following expression:
=Switch(Fields!currency.Value = "US $",
Switch(
Fields!RatePer.Value = "Load", Count(Fields!tripId.Value) * Fields!rate.Value,
Fields!RatePer.Value = "Ton", Sum(Fields!tonnage.Value) * Fields!rate.Value,
Fields!RatePer.Value = "Litre", Sum(Fields!tonnage.Value) * Fields!rate.Value,
Fields!RatePer.Value = "Kilogram", Sum(Fields!tonnage.Value) * Fields!rate.Value
))
If the rate is USD and per Load it calculates the revenue by number of loads * rate.
If the rate is per ton it calculates the revenue by tonnage * rate.
The .rdlc file just shows it as «Expr» so the "Add total" function does not work.
How do I sum the total revenue at the bottom of the column?
Please help!
What I have tried:
I have tried using the SUM function in the expression but it cannot work that way