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

Get inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.

Reply
Jas1998
New Member

Need Distinct Count to ignore one field

Hey guys,

 

So basically my dataset has order data for two markets combined into one. I manually combined them, but they have the same columns etc so it's okay. To distinguish between the two markets I've added a column which says 'Market' either 'England' or 'USA'

The issue is when I do a distinct count on order # to find out unique orders. Looks like both the markets have some similar Order IDs which causes an issue as distinct count would not count it as two, but as one. Is there any way past this or will I need to create two seperate views? Can I get a distinct count which sort of ignores duplicates ONLY if that duplicate belongs to another market?

 

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Jas1998 , Based on what I got, A new measure

 

countrows(Summarize(Table, Table[Market], Table[Order ID]) )

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

@Jas1998 , Based on what I got, A new measure

 

countrows(Summarize(Table, Table[Market], Table[Order ID]) )

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

Wow, thank you so much. Worked. 

Can you take a minute to explain the logic to me? And how do I get a grip of these advanced formulas? I've only done a beginner course. 

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 FABINSIDER for a $400 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

Check out the February 2025 Power BI update to learn about new features.

March2025 Carousel

Fabric Community Update - March 2025

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

Top Kudoed Authors