Forum Discussion
gumis_rulez
Helper I
2 years agoProperly calculating cummulative value
I am struggling with cummulative value when I am creating a summarize table in dax measure: I am using "others" to calculate the result for all other customers which have rank higher than p...
- Anonymous2 years ago
Thanks for the reply from FlipFlop1 and Selva-Salimi.
Hi gumis_rulez ,
Here is the formula I provided:
MEASURE =
VAR _table =
ADDCOLUMNS (
SUMMARIZE ( ALL ( 'hlpCustomer' ), 'hlpCustomer'[customer_name] ),
"rank", [Rank]
)
VAR _current_rank = [Rank]
RETURN
IF (
ISINSCOPE ( hlpCustomer[customer_name] ),
SUMX ( FILTER ( _table, [rank] <= _current_rank ), [Revenue] )
)The result is as follows:
Best Regards,
Zhu
Community Support TeamIf there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Selva-Salimi
Solution Sage
2 years ago
you can write it as follows:
calculate (sum(revenue), filter (table, evenue <= earlier (revenue))
If this post helps, then I would appreciate a thumbs up and mark it as the solution to help the other members find it more quickly.