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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
SrinathLM10
Helper I
Helper I

How to show Excluded values from 2 tables in a report

table1 {A, B} table2 {A, ids} table3 {A, ids}

table1 -> table2 Active Relation

table1 -> table3 Active Relation

 

How can I get the ids (show the list in the report) that are in table3 but not in table2? (filtered by A)

 

Table1 (1:*) relationship with Table2 

Table 1 (1:*) relationship with Table3

 

table1      table 2   table 3

A  |  B     A | C | ids      A | ids

______     _________      _______

p  | a      p | x | 1          P | 1

q  | b      p | x | 2          P | 2

r   | c      p | y | 3          p | 3

s   | d     p | y | 4          p | 4

t   | e      q | x | 2          p | 5

So in my report filter if I select C = 'x'  I want to see one Table View with id's ( 1, 2 ) and another table view with id's ( 3, 4, 5 ) 

and if I select C = 'y'  I want the first Table to show id's ( 3, 4 ) and the second Table to show id's ( 1, 2, 5 ) 

4 REPLIES 4
amitchandak
Super User
Super User

@SrinathLM10 ,

 

In case table one has all the ids. The last measure you can show in visual with if of Table 1

 

 

cnt3 = count(Table3[id])
cnt2 =count(table2[id])

id in 3 not in 2 =countx(Table1,if(not(isblank(cnt3)) && isblank(cnt2),1,blank()))

 

If table 1 do not have id and only table 3 has

this will give you a table for that

id in 3 not in 2 = except(all(Table3[id]),all(Table2[id]))

 

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

thanks, @amitchandak  for the reply, but the solution you provided shows the Excluded ID across of the whole table but I want to get something like below.

 

Table1 (1:*) relationship with Table2 

Table 1 (1:*) relationship with Table3

 

table1      table 2   table 3

A  |  B     A | C | ids      A | ids

______     _________      _______

p  | a      p | x | 1          P | 1

q  | b      p | x | 2          P | 2

r   | c      p | y | 3          p | 3

s   | d     p | y | 4          p | 4

t   | e      q | x | 2          p | 5

So in my report filter if I select C = 'x'  I want to see one Table View with id's ( 1, 2 ) and another table view with id's ( 3, 4, 5 ) 

and if I select C = 'y'  I want the first Table to show id's ( 3, 4 ) and the second Table to show id's ( 1, 2, 5 ) 

Anonymous
Not applicable

@SrinathLM10 

Try create a measure:

Not equal = CALCULATE(MAX('Table (2)'[C]),FILTER(ALLSELECTED('Table (2)'),[C]<>SELECTEDVALUE('Table (2)'[C])))

 

exclude measure.JPG

Check the attached pbix file for detail.

 

Paul Zheng _ Community Support Team
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

@Anonymous Thanks for the reply, Looks like the solution you provided has an active connection between the table(2) ids and table(3) ids. but I am looking for a solution without the relation, and also the ids in table 3 are not unique, we can also have entries like (q, 1) (q, 2) (q,3)

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

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