In SSRS reports I have created this calculated fields to calculate or return sales of Bike WRT to the previous year but it ends up showing error:-
The expression used for the calculated field 'CompareSales' includes an Aggregate, RowNumber, Running Value, Previous or lookup function.
Aggregate, RowNumber, RunningValue, Previous and lookup functions cannot be used in calculated field expressions.
I have tried every possibility to avoid error.
This is my piece of code:
=SUM(iif(Fields!Year_1.Value=MAX(Fields!Year_1.Value),Fields!BikeBuyer.Value,0))
-SUM(iif(Fields!Year_1.Value=MAX(Fields!Year_1.Value)-1,Fields!BikeBuyer.Value,0))
/SUM(iif(Fields!Year_1.Value=MAX(Fields!Year_1.Value)-1,Fields!BikeBuyer.Value,0))
When I remove SUM() from my code it executes successfully, but it won't produce the proper output.
Please Suggest me what I can do!!!
Thank You in Advance