How to specify group in RunningValue function in SQL Server Reporting Services?
It's complaining about the scope parameter: "Campaign". Rather than pass the column name to the function, you need to define a group (if there is not one already) on that column in your chart and pass the name of the group instead. An example here.
JackReacher
Mathematics student from Connecticut. Thanks to everyone sharing their knowledge with me to help me learn.
Updated on November 29, 2020Comments
-
JackReacher over 3 years
I have a data set with the following fields:
Serialnumber, Dateofpayment, Paymentamount, Sourcecode and Campaign.
My data has only two campaign types, BS12 and BS13.
I'm trying to plot a running total of the payment amount by Campaign. In the chart I have the following expression for the Y value:
=RunningValue(Fields!PAYMENTAMOUNT.Value, SUM, "Campaign")
However, I keep getting the error:
The Y expression for the chart 'Chart1' has a scope parameter that is not valid for RunningValue, RowNumber of Previous. The scope parameter must be set to a string constant that is equal to the name of a containing group within the Tablix 'Chart1'.
I've looked up multiple sources and I feel like I am doing the right thing, Campaign is clearly a field in my tablix and I have entered it as a string. Why is the error occurring? - Can someone help me?
-
JackReacher almost 11 yearsHi, I've started a new report and added "Campaign" as a group, it now appears as table1_Campaign in the Row Groups - but the error is still occurring??
-
davmos almost 11 yearsYou should keep
Campaign
as a column, but define a group on it. More details here.