Forum Discussion
glaso-is
8 years agoFrequent Visitor
DAX: Cumulative Total Applying filters
Hi, I was trying to get the cumulative total from a filtered dataset selecting some years in the slicer, but I'm always obtaining the cumulative from the whole dataset only for the selected years...
popov
Resolver III
8 years agoHi, glaso-is
If I correct understud, you need to use ALLSELECTED() function, something like this:
Cumulative Total Applying filters :=
CALCULATE (
[Total Sales];
FILTER (
ALLSELECTED ( 'Calendar' );
'Calendar'[Date] <= MAX ( 'Calendar'[Date] )
)
)
MKY
2 years agoFrequent Visitor
Function 'ALLSELECTED' made lot of difference in one of the database I was working with. I was using 'ALL' but when replaced with 'ALLSELECTED' the issue was resolved. Thanks a lot.