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
Mudlogger
Regular Visitor

Find the number of DISTINCTCOUNT of the overlap having 2 Categories.

Hi Guys,

 

This question may sound simple but I could not find a solution here.

I have a table that has 2 columns User and Category,

I would like to find the number of how many unique people fall into each Category (T/F).

The problem is there are some users having both Categories.

I do not know the way to find this number.

 

you can see what I mean in the picture below. I do not know how to get the table on the right side.

 

image.png

 

Thank you in advance 

I am very appreciated for your answer.

 

 

1 ACCEPTED SOLUTION

His is my solution :

1- in Power Query, Create a copy of the particular table 

2- then, in User column, create a group as below :

MahyarTF_0-1661403134868.png

 

3- Filter the Count just for show the Count = 2

MahyarTF_1-1661403172822.png

4- in the main table, create the merge table :

MahyarTF_2-1661403216589.png

5- then, tick just Count

MahyarTF_3-1661403252187.png

6-in Power BI create a simple column :

NewCategory = if (Sheet123All[Sheet123 (2).Count] = 2, "T and F", Sheet123All[Category])
7- the develop the below table (count for User)
MahyarTF_4-1661403337951.png

 

Mahyartf

View solution in original post

8 REPLIES 8
MahyarTF
Memorable Member
Memorable Member

Hi,

Create a table visual and Drag the Category and User as a column, then change the user attribute as shown the distinct count :

MahyarTF_0-1661401597462.png

 

 

Mahyartf

Hi MahyarTF,

 

Thank you for your answer.
As you can see F =4 , T = 5  is not equal to 7
So, I need to find the overlap in both T and F.

Please help.

Change it to count, then the 9 is shown

Mahyartf

I would like to see a table like my picture above

T = 3

F = 2

***T and F = 2***

(Total will be 7)

 

His is my solution :

1- in Power Query, Create a copy of the particular table 

2- then, in User column, create a group as below :

MahyarTF_0-1661403134868.png

 

3- Filter the Count just for show the Count = 2

MahyarTF_1-1661403172822.png

4- in the main table, create the merge table :

MahyarTF_2-1661403216589.png

5- then, tick just Count

MahyarTF_3-1661403252187.png

6-in Power BI create a simple column :

NewCategory = if (Sheet123All[Sheet123 (2).Count] = 2, "T and F", Sheet123All[Category])
7- the develop the below table (count for User)
MahyarTF_4-1661403337951.png

 

Mahyartf

Hi MahyarTF,

 

I do not know why I can not click "OK" on this step.

Please advise

 

Mudlogger_0-1661405215891.png

 

You have to select the link column (User) in each table.(just click on the title of the column in each table)

Mahyartf

Thank you MahyarTF, It works for me, and I will accept your answer as a Solution ^^

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

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!

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