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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
SDittmannFleet
Advocate IV
Advocate IV

Distinct Count not working as expected

I have a small report that is giving me a headache. There are two tables, "Users" and "Login History". The two were merged in Power Query to whittle things down, and they are also connected in the model.

  • Total row count for "User" is 227.
  • When I remove duplicates for "Login History", I get 161.

I also have two other tables which were created using joins as follows: 

  • Users w/o Login History - joining "User" and "Login History" using LeftAnti. The table has 66 rows.
  • Users w/ Login History - joining "User and "Login History" using Inner. The table has 161 rows, which matches the above when removing duplicates in the full table.

So far, so good. Everything matches. However, when I go for either "Count(Distinct)" in the fields pane of a card visual, or if I put a measure there achieving the same thing, the count is off by 20, and I cannot figure out why. There are no blanks in the column I am aggregating.

 

SDittmannFleet_0-1685463931749.png

 

 

2 REPLIES 2
SDittmannFleet
Advocate IV
Advocate IV

Can you please clarify your question? The two tables I'm mentioning in the second part were created as a check. I would expect DISTINCTCOUNT or Count(distinct) to yield the same number, but it's off.

amitchandak
Super User
Super User

@SDittmannFleet , You deleted the table level duplicate or the User Duplicate?

 

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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