Forum Discussion
Anonymous
8 years agoNot applicable
Visual Filter for Cumulative Sum Issue
Hi, I need some help with cumulative sum line. Before selecting any slicer, the visual shows this: But after applying filter, the visual shows the below. How then can I make the...
- 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)
Anonymous
8 years agoNot applicable
Thanks parry2k and Seward12533!
BTW parry2k, do you know how to make the line start from week 1 as well?
Seward12533
8 years agoSolution Sage
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)- Anonymous8 years agoNot applicable
Awesome! Thanks Seward12533!