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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

DistinctCount with filter.

I have the following data:

 

Table of Sellers

Saller_ID,Client_ID,Region
1,1,North
1,2,North
1,3,South
2,4,North
3,5,West
4,6,East
5,7,East
5,8,East
6,9,South
7,10,South
8,11,South

 

Table of Clients

Client_ID
1
2
3
4
5
6
7
8
9
10
11

 

 

I want to produce the following chart:

Region   Distinct Count of Client_ID

North             2

South            4

West             1

East              2

 

But I'm getting this as result:

Region   Distinct Count of Client_ID

North             3

South            4

West             1

East              3

 

 

 How can I distinct count ID by Region using a measure?  

 

 

 

1 ACCEPTED SOLUTION
Sean
Community Champion
Community Champion

Well you either want Distinct Sellers or you have the data reversed

(meaning data in Seller_ID column should be in Client_ID and vice versa)

Distinct Sellers = DISTINCTCOUNT ( 'Sellers Table'[Seller_ID] )

View solution in original post

5 REPLIES 5
Vvelarde
Community Champion
Community Champion

@Anonymous

 

Hi Friend, Look the Image Please

 

Dcount.gif




Lima - Peru
Anonymous
Not applicable

Hi @Vvelarde, I forgot to mention that I need to do it using a measure. Can you help me?

@Anonymous

 

Hi, try this:

 

TheMeasure = DISTINCTCOUNT(Table1[Id])




Lima - Peru
Anonymous
Not applicable

@Vvelarde, I edited my data again with more details. 

Sean
Community Champion
Community Champion

Well you either want Distinct Sellers or you have the data reversed

(meaning data in Seller_ID column should be in Client_ID and vice versa)

Distinct Sellers = DISTINCTCOUNT ( 'Sellers Table'[Seller_ID] )

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 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.

Top Solution Authors
Top Kudoed Authors