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

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote 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])

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
Power BI DataViz World Championships

Power BI Dataviz World Championships

Vote for your favorite vizzies from the Power BI World Championship submissions!

Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

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

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.