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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! 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
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.