Forum Discussion
Anonymous
4 years agoNot applicable
Running total with ALL() is affected by visual filter
Dear power bi community, I have a weird problem. Trying to write a calculated measure to calculate a running total by category. The calculation is working so far, however I have problems when usi...
- 4 years ago
Hi, Anonymous
If your just want the four slicers (filters) on the page are affected, please try formula as below:
RunningTotal = VAR MaxCategory = MAX ( table[category] ) RETURN CALCULATE ( DISTINCTCOUNT ( table[issues] ), FILTER ( ALL ( table ), table[slicer_1] = MAX ( table[slicer_1] ) && table[slicer_2] = MAX ( table[slicer_2] ) && table[slicer_3] = MAX ( table[slicer_3] ) && table[slicer_4] = MAX ( table[slicer_4] ) && table[category] <= MaxCategory ) )Best Regards,
Community Support Team _ Eason
PaulDBrown
Community Champion
4 years agoTry:
RunningTotal =
VAR MaxCategory =
MAX ( table[category] )
RETURN
CALCULATE (
DISTINCTCOUNT ( table[issues] ),
FILTER ( ALL ( table ), table[category] <= MaxCategory )
)
Mr_Jones
2 years agoNew Member
Thank you PaulDBrown - this really helped me. I adapted your example from DISTINCTCOUNT to SUM for what I needed.