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

Connecting 2 Tables

Hi,

 

I have 1 table with ID # column which are not unique. I have another table with names and ID# which are not unique. I want to add a column to table 1 with a flag showing if the ID exists in table 2. The challege is that I wish to filter both tables in the dashboard. Meaning:

Table 1

1

1

2

3

3

4

 

Table 2

1 j

1 k

2 h

4 j

 

Result:

1 Y

1 Y

2 Y

3 N

3 N

4 Y

 

However, if I use the slicer in the dashboard and choose only j or k or both from table 2 and only ID # 1 and 2 from Table 1, the result should be:

1 Y

1 Y

2 N

 

 

I hope I am explaining myself correctly.

Appreciate any help

1 ACCEPTED SOLUTION
v-yueyunzh-msft
Community Support
Community Support

Hi, @Asking 

For your needs, the values change dynamically according to the slicer, and the calculation cannot be dynamically calculated in the visual, so we need to use the new measure to achieve your needs.

Here are the steps you can refer to :
(1)To automatically deduplicate the Table and Matrix visuals, we need to create a new Index column in Table1:

vyueyunzhmsft_0-1665974105489.png

(2)We need to create a measure :

Measure = 
var _id = VALUES(Table1[ID])
var _t_count =COUNTROWS( FILTER( 'Table2' ,  'Table2'[ID] in _id))
return 
IF( _t_count =BLANK() ,"N", "Y")

(3)Then we put the filed in the visual , and we will meet your need :

vyueyunzhmsft_1-1665974165999.png

(4)We can also close the "Column headers-Text wrap" to hide the 'index' column:

vyueyunzhmsft_2-1665974255712.png

Best Regards,

Aniya Zhang

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

2 REPLIES 2
v-yueyunzh-msft
Community Support
Community Support

Hi, @Asking 

For your needs, the values change dynamically according to the slicer, and the calculation cannot be dynamically calculated in the visual, so we need to use the new measure to achieve your needs.

Here are the steps you can refer to :
(1)To automatically deduplicate the Table and Matrix visuals, we need to create a new Index column in Table1:

vyueyunzhmsft_0-1665974105489.png

(2)We need to create a measure :

Measure = 
var _id = VALUES(Table1[ID])
var _t_count =COUNTROWS( FILTER( 'Table2' ,  'Table2'[ID] in _id))
return 
IF( _t_count =BLANK() ,"N", "Y")

(3)Then we put the filed in the visual , and we will meet your need :

vyueyunzhmsft_1-1665974165999.png

(4)We can also close the "Column headers-Text wrap" to hide the 'index' column:

vyueyunzhmsft_2-1665974255712.png

Best Regards,

Aniya Zhang

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

 

 

amitchandak
Super User
Super User

@Asking , You need a measure in this case

 

measure  =

var _tab = values(Table2[ID])

var _cnt= countx(filter(Table1, Table1[ID] in _tab), Table1[ID])

return

if(isblank(_tab) , "N" else "Y")

 

 

Or add new column in table 1 and join two tables and try filter

New column =

var _cnt = countx(filter(Table2, Table[ID] = Table1[ID]), Table2[ID])

return

if(Isblank(_cnt) , "N", "Y")

 

 

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.