Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
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 is in Dropbox: https://www.dropbox.com/s/v1qbun4v8g78wh5/SampleData_CumulativeMatrix.csv?dl=0
My current DAX Measure for Count of Code = COUNT('Table'[Code])
For % I am using %GT Count of Code in Values, if a measure works better please advise
My cumulative count and cumulative measures are a mess because I need to sort by code desc. I created a sorting table to order by desc, sorting Code by Index:
T
able data is in attached Dropbox link. Thank you!
Carly
Solved! Go to Solution.
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
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
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
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
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
74 | |
73 | |
56 | |
38 | |
31 |
User | Count |
---|---|
83 | |
64 | |
63 | |
49 | |
45 |