Forum Discussion
AlexXandyr
Helper I
3 years agoCumulative % for customers
Hello everyone, Im trying to create a cumulative % measure on my data (yellow highlighted column). - % to total is based on column $ by using "percent of grand total" on my $ measure - I want ...
Jihwan_Kim
Super User
3 years agoHi,
Please check the below picture and the attached pbix file.
Value measure: =
SUM( Data[Value] )
Percentage to total: =
VAR _total =
CALCULATE ( [Value measure:], ALL ( Data[Company], Data[PartyCode] ) )
RETURN
DIVIDE ( [Value measure:], _total )
Percentage cumulate: =
VAR _total =
CALCULATE ( [Value measure:], ALL ( Data[Company], Data[PartyCode] ) )
VAR _valuecumulate =
CALCULATE (
[Value measure:],
WINDOW (
1,
ABS,
0,
REL,
ALL ( Data[Company], Data[PartyCode] ),
ORDERBY ( [Value measure:], DESC )
)
)
RETURN
DIVIDE ( _valuecumulate, _total )