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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
S13
New Member

Count distinct not working

Hey all I have an issue where distinctcount does not seem to be giving me the right results. 

 

I have two tables (a & b) with b being a duplicate of a. I have written a measure for both tables to count the unique ids (see below).

 

Triggers = DISTINCTCOUNT(a[RECOMMENDATION_ID])

Distinct_Count = DISTINCTCOUNT(b[RECOMMENDATION_ID])
 
The result that I am getting are different with table a being the correct one. 
S13_0-1660150009503.png

I am not sure why b is return the 541k result. Moreover, when I look at the table b in the "table view" and highlight the recommendation_ID column, it is giving me the correct distinct count - see below +1 added on purpose.

S13_2-1660150146859.png

 

I've been searching for the last two days for a solution with no luck. Any help would be appriciated as I am stumped. Thanks.


 

3 REPLIES 3
Anonymous
Not applicable

I am not sure why Distinct count would be more than Count all?

How can 1881631 would be distinct count ?

tackytechtom
Super User
Super User

Hi @S13 ,

 

Could there be a filter on the visual/page/report? Otherwise, do you have the possibility to share your file? 🙂

 

/Tom
https://www.tackytech.blog/
https://www.instagram.com/tackytechtom/



Did I answer your question➡️ Please, mark my post as a solution ✔️

Also happily accepting Kudos 🙂

Feel free to connect with me on LinkedIn! linkedIn

#proudtobeasuperuser 

Thanks for the reply. There is no filter on the page/report/visual. Unfortunatly it is a work related project and cannot share the file... wish I could though since I feel like it's probably something simple that I am over looking.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.