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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
lcasey
Post Prodigy
Post Prodigy

unique values are wrong

Hello,

 

I have a table that counts CASEID (Revenue Accounts)  and then performs a CountDistinct Case ID (Unique Accounts).  However, it is completely wrong when showing a matrix by month.

 

The total 48 at the bottom is correct, but yet when I look month by month the unique accounts match the Revenue accounts and it should not. It should ONLY show unique values.

 

How  can I get only the unique values to show up in the rows rather than the same exact number. In this case, there are 76 revenue accounts of which only 48 are unique. Regardless of the Months, I want to show only the uniques values. So if a record was entered in January and then again in February, then only 1 unique ID will show in 1 of those months.

 

1.png

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @lcasey ,

 

Based on your description, I have built a simple data sample:

Eyelyn9_0-1630291936928.png

 

Please try:

Measure = CALCULATE(DISTINCTCOUNT('Table'[Case ID]),ALLEXCEPT('Table','Table'[Month]))

Here is the final output:

Eyelyn9_1-1630291955237.png

 

Best Regards,
Eyelyn Qin
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
Anonymous
Not applicable

Hi @lcasey ,

 

Based on your description, I have built a simple data sample:

Eyelyn9_0-1630291936928.png

 

Please try:

Measure = CALCULATE(DISTINCTCOUNT('Table'[Case ID]),ALLEXCEPT('Table','Table'[Month]))

Here is the final output:

Eyelyn9_1-1630291955237.png

 

Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Greg_Deckler
Community Champion
Community Champion

@lcasey Sorry, having trouble following, can you post sample data as text and expected output?
Not really enough information to go on, please first check if your issue is a common issue listed here: https://community.powerbi.com/t5/Community-Blog/Before-You-Post-Read-This/ba-p/1116882

Also, please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490

The most important parts are:
1. Sample data as text, use the table tool in the editing bar
2. Expected output from sample data
3. Explanation in words of how to get from 1. to 2.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

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