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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
Anonymous
Not applicable

Text Distinct Count

Hi All,

 

I have a dataset similar to the below.

 

DateIDFail Reason
01/01/20211Too big
01/02/20211Too small
02/01/20212Incorrect 
03/02/20213Too big

 

Column 'ID' is marked as a text field. I am trying to do a distinct count of column 'ID' which reffering to the above dataset should return 3.

 

Putting the column 'ID' into a card visual and summarizing to Distinct Count is returning 4 and summarizing to Count is returning 4.

 

Any ideas as to why I am not seeing the desired 3 answer?

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Anonymous , Refer @Arul  solution. Also, check do you have some space around the other 1. Use trim and lean in power query to clean ID column

Power Query Trim and Clean : https://youtu.be/NRYPsCnS0w4

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

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@Anonymous , Refer @Arul  solution. Also, check do you have some space around the other 1. Use trim and lean in power query to clean ID column

Power Query Trim and Clean : https://youtu.be/NRYPsCnS0w4

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
Arul
Super User
Super User

Hi @Anonymous ,

 

I am getting the correct value while using the sample dataset with which you were provided. I have used Count (Distinct) option.

Arul_0-1648640028546.png

 

Thanks,

Arul

 

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!


LinkedIn


Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Top Solution Authors