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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
drem
New Member

Finding the differences between 2 identical tables filtered differently through slicers

Hi, I have 2 tables which are identical and filtered through 2 different slicers for column "Occupation". I would like to create a new table which shows the differences between the filtered tables for column "Skill". Please see the following:

 

Original data Table 1 and 2 (unfiltered)

OccupationSkill
NurseCommunication
NurseOther
DoctorPerform operation
DoctorCommunication
DoctorOther

 

----------------------------------------------------------------------------

Table 1 (filtered Occupation column on Nurse)

OccupationSkill
NurseCommunication
NurseOther

 

Table 2 (filtered Occupation column on Doctor)

OccupationSkill
DoctorPerform operation
DoctorCommunication
DoctorOther

 

I would like Table 3 which shows the difference in column "Skill" between filtered Table 1 and filtered Table 2

Skill
Surgery

 

 

This is what I would like to achieve:

drem_0-1701240091141.png

I have tried using parameters in the backend but I was not able to link it with the slicers on the front end.

 

I appreciate any help with helping me solve this issue.

 

Thank you

 

 

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi  @drem 

You can refer to the following solution.

1.You can create two tables, then put the values of the two tables to two slicers.

 

Slicer 1 = SUMMARIZE('Table',[Occupation])
Slicer 2 = SUMMARIZE('Table',[Occupation])

 

2.Create the the following measures.

 

Measure_Slicer1 = IF(SELECTEDVALUE('Table'[Occupation]) in VALUES('Slicer 1'[Occupation]),1,0)
Measure_Slicer2 = IF(SELECTEDVALUE('Table'[Occupation]) in VALUES('Slicer 2'[Occupation]),1,0)

 

put the measure_slicer1 to the table visual filter(the table is filted to the doctor)

vxinruzhumsft_0-1701414043290.png

put the measure_slicer2 to the table visual filter(the table is filted to the nurse)

vxinruzhumsft_1-1701414075290.png

put the measure3 to the table visual filter(the table is filted to the difference)

vxinruzhumsft_2-1701414151060.png

Output

vxinruzhumsft_3-1701414220828.png

 

Best Regards!

Yolo Zhu

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

View solution in original post

4 REPLIES 4
drem
New Member

Thank you @swikritee_p  for your response. I have followed your suggestion but I still can't get Table 3 to display the correct result.

 

Table 3 should only return 1 row "Doctor | Perform operation" because it exists in Table 2 but not Table 1. The screenshot shows it is returning all values in the combined table.

 

Also " You need a table with combine values " - I created a new table using the merge query (combine Table 1 and Table 2 using Full Outer Join) on column "Occupation", can you please clarify if this is correct?

 

If you could attach your working solution that would be great. 

 

drem_0-1701325194001.png

Thank you

 

 

 

Anonymous
Not applicable

Hi  @drem 

You can refer to the following solution.

1.You can create two tables, then put the values of the two tables to two slicers.

 

Slicer 1 = SUMMARIZE('Table',[Occupation])
Slicer 2 = SUMMARIZE('Table',[Occupation])

 

2.Create the the following measures.

 

Measure_Slicer1 = IF(SELECTEDVALUE('Table'[Occupation]) in VALUES('Slicer 1'[Occupation]),1,0)
Measure_Slicer2 = IF(SELECTEDVALUE('Table'[Occupation]) in VALUES('Slicer 2'[Occupation]),1,0)

 

put the measure_slicer1 to the table visual filter(the table is filted to the doctor)

vxinruzhumsft_0-1701414043290.png

put the measure_slicer2 to the table visual filter(the table is filted to the nurse)

vxinruzhumsft_1-1701414075290.png

put the measure3 to the table visual filter(the table is filted to the difference)

vxinruzhumsft_2-1701414151060.png

Output

vxinruzhumsft_3-1701414220828.png

 

Best Regards!

Yolo Zhu

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Thanks so much @Anonymous ! 

swikritee_p
Resolver II
Resolver II

@drem , First of all you need two disconnected table Occupation

 

Occupation 1 = distinct(union(distinct(Table1[Occupation]),distinct(Table2[Occupation])))

 

Occupation 2 = distinct(union(distinct(Table1[Occupation]),distinct(Table2[Occupation])))

 

Use them in slicer 

 

Now create measures 

M1 = //for Table1 

countrows(Filter( Table1,Table1[Occupation] in values(Occupation1[Occupation]) )

 

 

M2 = //for Table2 

countrows(Filter( Table2,Table2[Occupation] in values(Occupation2[Occupation]) )

 

 

M3 = //for Visual Table3 - You need a table with combine values 

countrows(Filter( Table3, ( Table3[Occupation] in values(Occupation2[Occupation]) ||  Table3[Occupation] in values(Occupation1[Occupation])  ))

 

Or you can use except for a static table  

 

table3 =  except(Table1, Table2) 

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors