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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

Distinct count overlap

I'm not sure how to being to solve this problem:

 

I have business data with client IDs and Location names, I've created a table with the location names as a column and a distinct count of clients as another. I realized that this distinct count is for distict client ids across all of our locations, so the disticnt counts for each row (locations) do not sum up to the total. I created a measure that sumerizes the distinct count of client Ids within each loaction so that the column totals add up using SUMMERIZE. 

 

What I want to know is, how do I figure out which locations have disinct client overlaps and by how much?

example:

 

Location    DefaultDisitinctCount    MyDistinctCountMeasure

AAA            100                                   100

BBB               50                                     50

Total           145                                   150

 

So this tells me that there are 5 distinct clients that overlap for these 2 locations

 

I know the tricky part is going to be that multiple locations can have client overlap.

 

Any help would be great!

 

1 ACCEPTED SOLUTION

This will give you a table with common values. Change as per need

 

 

Table = INTERSECT(ADDCOLUMNS(FILTER(Sales,Sales[Sales Date] >= date(2018,06,30)),"AA",Sales[Sales Date]),ADDCOLUMNS(FILTER(Sales,Sales[Sales Date] >= date(2018,06,29)),"AA",Sales[Sales Date]))

 

 

Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution. In case it does not help, please provide additional information and mark me with @
Thanks.

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

3 REPLIES 3
amitchandak
Super User
Super User

Please explore intersect

 

https://docs.microsoft.com/en-us/dax/intersect-function-dax

 

Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution. In case it does not help, please provide additional information and mark me with @
Thanks.

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
Anonymous
Not applicable

@amitchandak 

 

I'm not sure how I would use intersect in this case. I don't have 2 tables of data and I want to see the intersect between all of the locations, which are values in a single column.

 

 

Thanks

This will give you a table with common values. Change as per need

 

 

Table = INTERSECT(ADDCOLUMNS(FILTER(Sales,Sales[Sales Date] >= date(2018,06,30)),"AA",Sales[Sales Date]),ADDCOLUMNS(FILTER(Sales,Sales[Sales Date] >= date(2018,06,29)),"AA",Sales[Sales Date]))

 

 

Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution. In case it does not help, please provide additional information and mark me with @
Thanks.

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
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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