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
Adidas
Helper I
Helper I

Retrieve values from another unrelated table

Hi all, 

I have two tables Table1 & unrelated Table2

a common 'ID' column exists in both tables 

The only use of table2 is for a slicer built over it.

I need to calculate a new column in Table1 called 'Match' that should have the value "True"
only if the same ID was selected in the slicer.

obviously, I can't use the RELATED function because the tables have no relationship,

Tried that with no success:

Match = CALCULATE(COUNTROWS(Table2), FILTER(Table2, Table2[id] = EARLIER(Table1[ID]) )) > 0
There is no effect by the chosen values by the slicer
Capture2.JPG

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Adidas ,

 

Check the formula.

Measure = IF(NOT(ISFILTERED('Table (2)'[Id])),FALSE(),IF(SELECTEDVALUE('Table'[Id]) in VALUES('Table (2)'[Id]),TRUE(),FALSE()))

Result would be shown as below.

1.PNG2.PNG 

 

Best Regards,

Jay

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

Hi @Adidas ,

 

Check the formula.

Measure = IF(NOT(ISFILTERED('Table (2)'[Id])),FALSE(),IF(SELECTEDVALUE('Table'[Id]) in VALUES('Table (2)'[Id]),TRUE(),FALSE()))

Result would be shown as below.

1.PNG2.PNG 

 

Best Regards,

Jay

littlemojopuppy
Community Champion
Community Champion

You can simulate a relationship between two unrelated tables by using the TREATAS() function

Propagating filters using TREATAS in DAX - SQLBI

amitchandak
Super User
Super User

@Adidas , Try a measure like

Match = CALCULATE(COUNTROWS(Table2), FILTER(Table2, Table2[id] = max(Table1[ID]) )) //better to put row context using values

 

a new column like

Match = CALCULATE(COUNTROWS(Table2), FILTER(Table2, Table2[id] = (Table1[ID]) ))

 

Refer how to copy values from one table to another table as column -https://www.youtube.com/watch?v=czNHt7UXIe8

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 ,

unfortunately, both suggestions for measure and column didn't work for me,

still, it ignores the slicer's selections

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!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.