Forum Discussion
Anonymous
7 years agoNot applicable
Power BI Desktop | How can i do a Cumulative Percent Calculation
Hi everyone, iam struggeling to make a cumulative percent calculation depent "Value" ( "Betrag" in German) for supplier. I have made a percent calculation and it works well, but cumulative perce...
- 7 years ago
Hi Anonymous ,
To create a calculated column as below.
Table2 = SUMMARIZECOLUMNS('Table'[Supplier],'Table',"value1",SUM('Table'[Value]),"perc",[percent],"id",MAX('Table'[SupplierID]))Then add a calculated column in Table2.
rank = RANKX(ALL(Table2),Table2[perc],,DESC,Dense)
After that we can create a measure to get the excepted result as we need.
Measure 2 = CALCULATE(SUM(Table2[perc]),FILTER(ALLSELECTED(Table2),Table2[rank]<=MAX(Table2[rank])))
Regards,
Frank
v-frfei-msft
Community Support
7 years agoHi Anonymous ,
To create a calculated column as below.
Table2 = SUMMARIZECOLUMNS('Table'[Supplier],'Table',"value1",SUM('Table'[Value]),"perc",[percent],"id",MAX('Table'[SupplierID]))
Then add a calculated column in Table2.
rank = RANKX(ALL(Table2),Table2[perc],,DESC,Dense)
After that we can create a measure to get the excepted result as we need.
Measure 2 = CALCULATE(SUM(Table2[perc]),FILTER(ALLSELECTED(Table2),Table2[rank]<=MAX(Table2[rank])))
Regards,
Frank
Anonymous
7 years agoNot applicable
v-frfei-msft Thanks!