Starting December 3, join live sessions with database experts and the Microsoft product team to learn just how easy it is to get started
Learn moreGet certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. 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
Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.
User | Count |
---|---|
92 | |
87 | |
84 | |
65 | |
49 |
User | Count |
---|---|
140 | |
114 | |
110 | |
59 | |
59 |