Using Running Value on Expression
Hi, I have a table with the column being month, the row being the fiscal year(2012 and 2011), and the value is the sum amount. I added a row below named "Difference" and made the expression (Last(Fields!amount.value)-First(Fields!amount.value)) to calculate the difference the between the fiscal years for each month. Now I need to add another row below that to find the running value of the "Difference" row. When I use the RunningValue function I run into an error. It says the scope parameter needs to be either name of a containing group, name of a containing data region, or name of a dataset. Is there any way around this or a better way of doing this so I can use the RunningValue function on the expression I made? Any help would be greatly appreciated!! Dan
August 16th, 2012 12:17pm

Seems to be that the field you are trying to use for the "difference" is outside the scope of the dataset. When you use the RunningValue function, you can specify what dataset to use the value from, for ex. RunningValue(Fields!TestField.Value, "YourDataSet"). This is used if the dataset where that value is coming from is outside of the tablix dataset.Be more than a developer...be a business asset!
Free Windows Admin Tool Kit Click here and download it now
August 16th, 2012 1:21pm

What if you want to find the running value of something that is not in the dataset? The field that I want to find the running value for is an expression. The expression itself that makes up the difference contains a value that is in the dataset but I need the resulting number from the expression to make up the running value. That is why I am not sure where to point the RunningValue function to.
August 16th, 2012 1:25pm

Well what's the expression? If it's an expression you can try to do the following: code.YourExpressionCode(RunningValue(ValueBeingPassed, SUM)). This should help too http://msdn.microsoft.com/en-us/library/ms159136(v=sql.100).aspx Be more than a developer...be a business asset!
Free Windows Admin Tool Kit Click here and download it now
August 16th, 2012 2:28pm

=Last(Fields!amount.Value)-First(Fields!amount.Value) That is my expression to find the difference. Now I need to take that expression that is a row in my table and have a running value for it. What I would like to do is =RunningValue((Last(Fields!amount.Value)-First(Fields!amount.Value)), Sum, "DataSet1") However, you cannot have nested statements in the RunningValue(expression, function, scope) function. It comes down to figuring out what would the expression and scope would state.
August 16th, 2012 3:01pm

Hi Packman, From your description, you want to calculate the sum difference of all the month, right? If in this case, you can add a calculate field to your dataset like below: Field Name: Total Field Source: fields!month1.value + fields!month2.value + fields!month3.value Then you can use the expression below to calculate the sum difference of all the month: =Last(fields!Total.value) First(fields!Total.value) If not in this case, please provide more information about the structure of the dataset and the table in database to us. If possible, provide us a screenshot and some text data to us so that we can make further analysis and help you out. Regards, Charlie Liao
Free Windows Admin Tool Kit Click here and download it now
August 20th, 2012 9:20pm

Hi Charlie, Thanks for the response! I do think an image will help clear up what I am trying to do. I do not think the response above would help in this situation because the month is not a numerical value but the actual months of the year. There is an obligation amount for each month(columns) of the year and for the Fiscal Years 2012 and 2011(rows). I found the difference by doing (Last(Fields!Obligation.Value) - First(Fields!Obligation.Value)) and now need to do a running value on that expression. Thank you!
August 21st, 2012 8:54am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics