Forum Discussion
cumulative sum issues when filtering
ImkeF not sure but your suggested calculation doesn't give me the right running total if i pull in sign up date on the row. The issue seems the field selected on the row that changes the context for the running total. From the image below you can see the top one is through your calculation, second one is pledge total to cross check the value and the bottom on is by changing the calcuation to include signup context along with the channel. Slicer value are pass through correctly. The issue is do we need to create new measure for each of those field on the rows for the running total? If we have like Gender, town etc we will end up having quite a few measure for the same running total in various context!
There is a file H_Jones uploaded in the above thread, if you would liek to have a feel of the data.
Cumulative Pledges = CALCULATE (
[Pledges],
FILTER(ALLSELECTED(Sheet1), Sheet1[Attrition Flag]<= MAX ( Sheet1[Attrition Flag] ) ),
VALUES( Sheet1[Channel]) ,values(Sheet1[Sign up Date])
)
My measure will calculate cumulative totals for all attributes that you put into the rows (or columns), EXCEPT the fields that are included in the ALLSELECTED (Date and AttritionFlag), and ID, as this is what the measure counts.
Please check out this file where I've added some data for "Gender" and "OtherAttribute" with some sample data: https://www.dropbox.com/s/xltrrrpedty57jm/CumulativeSumWithFilters.pbix?dl=0
Please note that I don't use the VALUES like you do.
The file also contains a version with a Dimension table for AttritionFlag. If you use the field from that table instead, you won't have blanks in your cumulative figures where there is no value in the detail table (Table1).