Forum Discussion
Visual Filter for Cumulative Sum Issue
- 8 years ago
AnonymousUpdate cummulative total DAX as give below and that will do it, as Seward12533 suggested to use cross filter to both direction, it has performance hit but instead of setting up the relationship, you can use it in DAX formula basically you are using cross filter to both direction when required
Cumulative = CALCULATE( SUM('Table2'[Count]), CROSSFILTER(Table1[Week of Year],Table2[Week No.], Both), FILTER(ALL('Table2'), 'Table2'[Week No.]<=MAX('Table2'[Week No.])) ) - 8 years ago
Anonymous try this
Cumulative = VAR Result = CALCULATE( SUM('Table2'[Count]), CROSSFILTER(Table1[Week of Year],Table2[Week No.], Both), FILTER(ALL('Table2'), 'Table2'[Week No.]<=MAX('Table2'[Week No.])) ) RETURN IF(Result,Result,0)
Hey Anonymous Can you share the data in excel sheet for the solution?
Hey,
Here you go:
https://drive.google.com/file/d/1gr0UHXhg-Va_aLt-0QENIxqKVtKZtCLu/view?usp=sharing
Regards,
Nicholas
- v-piga-msft8 years agoResident Rockstar
Hi Anonymous,
It seems that you want to have a visual filter with cumulative Sum?
Could you share a screenshot of your visual filter setting?
Actually, if you have a visual filter for cumulative sum, it will show the values match the filter condition.
Best Regards,
Cherry
- Anonymous8 years agoNot applicable
Hi v-piga-msft,
I used a donut chart based on the category. So for example, when no category is applied, it shows this:
When I choose a category, say for category A:
Now obviously this looks fine since this constitutes most of the values, however the cumulative line is still not right, as it still shows the total, not total by category.
This becomes ugly when I apply to Category C:
My slicer looks like this:
Hope my explanation is clear enough.
Regards,
Nicholas Hiew
- Anonymous8 years agoNot applicable
Here is the pbix file if anyone is interested:
https://drive.google.com/file/d/1pT9GoD_vD0DZfVpwDKHkzDwuuU63nnEB/view?usp=sharing