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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

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
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

Top Solution Authors