- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Getting some measures from Count Distinct
Hi friends!
I've got a Matrix and i need to get the result of divide one columm by another (Both are distinct count fields). For example:
I need to get the result of 24116/1290 at %.
And, finally I need to take this too:
343456 divide by 1290.
How can I do it?
I've tried to Add a column but i can't put the column name.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Hey @marcss44 ,
you have to create two base measures like so:
M1 = DISTINCTCOUNT(<'table'[column1]>)
and this
M2 = DISTINCTCOUNT(<'table'[column2]>)
Based on this you can can create a third measure that divides the measures M1 and M2 rowwise like so:
M3 = DIVIDE( [M1], [M2] )
And the 4th measure divides the M2 value by the Total value of M1:
M4 = DIVIDE( [M2] , CALCULATE( [M1] , ALL( <'thetableusedonrows'[rowheader] ) ) )
Then you can use all 4 measures in the value well of the Matrix visual.
Hopefully, this helps to tackle your challenge.
Regards,
Tom
Did I answer your question? Mark my post as a solution, this will help others!
Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Hey @marcss44 ,
you have to create two base measures like so:
M1 = DISTINCTCOUNT(<'table'[column1]>)
and this
M2 = DISTINCTCOUNT(<'table'[column2]>)
Based on this you can can create a third measure that divides the measures M1 and M2 rowwise like so:
M3 = DIVIDE( [M1], [M2] )
And the 4th measure divides the M2 value by the Total value of M1:
M4 = DIVIDE( [M2] , CALCULATE( [M1] , ALL( <'thetableusedonrows'[rowheader] ) ) )
Then you can use all 4 measures in the value well of the Matrix visual.
Hopefully, this helps to tackle your challenge.
Regards,
Tom
Did I answer your question? Mark my post as a solution, this will help others!
Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Hi again friend! How can I use row headers and obtain the division correctly?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Now I've added new row header and the calculate filed is not working:
In green the new row header
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Thank you very much!

Helpful resources
Join us at the Microsoft Fabric Community Conference
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Power BI Monthly Update - February 2025
Check out the February 2025 Power BI update to learn about new features.

Subject | Author | Posted | |
---|---|---|---|
10-09-2024 09:44 AM | |||
08-13-2024 09:40 AM | |||
07-23-2024 10:28 PM | |||
10-07-2024 10:50 AM | |||
09-26-2024 12:17 AM |
User | Count |
---|---|
84 | |
78 | |
52 | |
38 | |
35 |
User | Count |
---|---|
95 | |
72 | |
55 | |
52 | |
46 |