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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
jay_patel
Helper IV
Helper IV

Looking for Sum of Distinct Count Of Cities

Hi All,

I am trying to calculate Distinct Count with no repetative Values Using DistinctCount Function. And the data looks like:-

Ahmedabad1
Mehsana1
Delhi1
Ahmedabad1
Surat1
Mehsana1
SUM6


Here, It taking Count of Ahmedabad and Mehsana City 2 times, but I need to calculate once 

Ahmedabad1
Mehsana1
Delhi1
Ahmedabad0
Surat1
Mehsana0
SUM4

 

Thanks in Advance!

1 ACCEPTED SOLUTION
v-janeyg-msft
Community Support
Community Support

Hi, @jay_patel 

 

You can use distinctcount function to calculate once.

Like this:

vjaneygmsft_0-1648801102646.png

Or you can drag the city field and select the 'count distinct' mode.

vjaneygmsft_1-1648801239704.png

 

Did I answer your question? Please mark my reply as solution. Thank you very much.
If not, please feel free to ask me.

Best Regards,
Community Support Team _ Janey

View solution in original post

2 REPLIES 2
v-janeyg-msft
Community Support
Community Support

Hi, @jay_patel 

 

You can use distinctcount function to calculate once.

Like this:

vjaneygmsft_0-1648801102646.png

Or you can drag the city field and select the 'count distinct' mode.

vjaneygmsft_1-1648801239704.png

 

Did I answer your question? Please mark my reply as solution. Thank you very much.
If not, please feel free to ask me.

Best Regards,
Community Support Team _ Janey

amitchandak
Super User
Super User

@jay_patel , Try a measure like

Countx(Summarize(Table, Table[City]), [City])

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

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! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

Find out what's new and trending in the Fabric community.