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

Next up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now

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
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

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.

FabCon and SQLCon Highlights Carousel

FabCon &SQLCon Highlights

Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.