Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
sotoc
Advocate I
Advocate 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:

 

desiredMatrix_Cumulative.jpg

 

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:

 

OrderTable.jpgT

 

able data is in attached Dropbox link. Thank you!
Carly

2 ACCEPTED SOLUTIONS
v-danhe-msft
Microsoft Employee
Microsoft Employee

Hi @sotoc,

Based on my test, you could refer to below steps:

Format the [Code] column from text to whole number.

1.PNG

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:

2.PNG

You can also download the PBIX file to have a view.

https://www.dropbox.com/s/m0xv4vji1nuli6g/Simple%20Cumulative%20Count%20Percentage%20Matrix.pbix?dl=...

 

Regards,

Daniel He

Community Support Team _ Daniel He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

v-danhe-msft
Microsoft Employee
Microsoft Employee

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

Community Support Team _ Daniel He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-danhe-msft
Microsoft Employee
Microsoft Employee

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

Community Support Team _ Daniel He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
v-danhe-msft
Microsoft Employee
Microsoft Employee

Hi @sotoc,

Based on my test, you could refer to below steps:

Format the [Code] column from text to whole number.

1.PNG

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:

2.PNG

You can also download the PBIX file to have a view.

https://www.dropbox.com/s/m0xv4vji1nuli6g/Simple%20Cumulative%20Count%20Percentage%20Matrix.pbix?dl=...

 

Regards,

Daniel He

Community Support Team _ Daniel He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors