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.
Anonymous
2 years agoNot applicable
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] )
)
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 Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.