Forum Discussion
sotoc
7 years agoAdvocate I
Simple Cumulative Count/Percentage Matrix
I'd like to learn the best way to create a 4 column matrix with counts of a field, % of the count, cumulative count and cumulative %. Here's what it looks like in Excel: Table data i...
- 7 years ago
Hi sotoc,
Based on my test, you could refer to below steps:
Format the [Code] column from text to whole number.
Create two measures:
cumulative count = CALCULATE(SUM(SampleData_CumulativeMatrix[Count of Code]),FILTER(ALL('SampleData_CumulativeMatrix'),'SampleData_CumulativeMatrix'[Code]>=MAX('SampleData_CumulativeMatrix'[Code])))cumulative% = [cumulative count]/CALCULATE(SUM(SampleData_CumulativeMatrix[Count of Code]),ALL(SampleData_CumulativeMatrix))
Result:
You can also download the PBIX file to have a view.
Regards,
Daniel He
- 7 years ago
Hi sotoc,
Could you please tell me if your problem has been solved? If it is, could you please mark the helpful replies as Answered?
Regards,
Daniel He
v-danhe-msft
7 years agoMicrosoft Employee
Hi sotoc,
Based on my test, you could refer to below steps:
Format the [Code] column from text to whole number.
Create two measures:
cumulative count = CALCULATE(SUM(SampleData_CumulativeMatrix[Count of Code]),FILTER(ALL('SampleData_CumulativeMatrix'),'SampleData_CumulativeMatrix'[Code]>=MAX('SampleData_CumulativeMatrix'[Code])))cumulative% = [cumulative count]/CALCULATE(SUM(SampleData_CumulativeMatrix[Count of Code]),ALL(SampleData_CumulativeMatrix))
Result:
You can also download the PBIX file to have a view.
Regards,
Daniel He