How to get cumulative monthly subtotals in SSRS?

I use SSRS to create a report that shows a lot of transactions according to the trading date. I created a band in the month and year called "grpMonthYear" . Inside this group, I created a subgroup on "TradeDate".

The groups and everyone works fine. I also create monthly subtotals in the footer of the grpMonthYear group.

But now I need cumulative subtotals.

For example, if Jan'13 totaled up to $ 5,000, and transactions in February'13 totaled up to $ 7,000. So the monthly subtotal on February 13th should show me $ 12,000.00

I tried to use

RunningValue(Fieldname,SUM,'grpMonthYear') 

But that will not work.

Am I missing something?

+4
source share
1 answer

You need to set the scope in the RunningValue function to one that is outside the current group, for example, the DataSet itself.

So something like:

 RunningValue(Fieldname,SUM,"DataSet") 

Here is a simple example based on the following data:

enter image description here

I created a simple report grouped by grpMonthYear :

enter image description here

The Month of Total is simply the amount in the current area.

The expression for Cumulative Total is as follows:

 =RunningValue(Fields!tradePrice.Value, SUM , "Trades") 

Where Trades is the name of the DataSet . Now it gives the required results:

enter image description here

So I hope this helps - just keep the order of all the table elements in mind, as well as the specific parent area to use if there are nested groups.

+9
source

Source: https://habr.com/ru/post/1479919/


All Articles