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
m4xon
Helper III
Helper III

How to check if a value is present in the second table using measure or calculated column

Hi All,

 

I have a following problem, I have two tables in a one-to-many relationship, which means that one record from the first table may have several counterparts in the second table. I need to check if there is any "Yes" value in this second table for each ID in first table, if so, it should return TRUE, otherwise FALSE. Currently I solved that by creating CALCULATED TABLE through SUMMARIZE and I extract that information via USERELATIONSHIP calculated column, but I was wondering if I can do it more easily using just MEASURE or just calculated column directly from that table.

 

Thank you in advance

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@m4xon , If you need a new column on one side table

New column = var _cnt = countx(filter(Table2, Table1[ID] = Table2[ID] && Table2[Value] = "Yes"), Table2[ID])
return
if(not(isblank(_cnt)), "Yes", "No")

 

 

refer 4 ways (related, relatedtable, lookupvalue, sumx/minx/maxx with filter) to copy data from one table to another
https://www.youtube.com/watch?v=Wu1mWxR23jU
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

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@m4xon , If you need a new column on one side table

New column = var _cnt = countx(filter(Table2, Table1[ID] = Table2[ID] && Table2[Value] = "Yes"), Table2[ID])
return
if(not(isblank(_cnt)), "Yes", "No")

 

 

refer 4 ways (related, relatedtable, lookupvalue, sumx/minx/maxx with filter) to copy data from one table to another
https://www.youtube.com/watch?v=Wu1mWxR23jU
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

Thank you!

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.