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! Learn more

Reply
Anonymous
Not applicable

check if value contains in another table through measure

Hi everybody, 

 

I have two tables (CurrentTable and HistoryTable) which are linked through myID. I want to display all elements form CurrentTable not contained in my filtered HistoryTable. 

I tried to use the proposed solution here, but the proposed solution through a custom column does not work for me because I want the result to depend on the applied filter. 


I think my problem could be solved through a measure. Unfortunately, I am still having trouble to understand the row context in measures. I am therefor a little lost and really apreciate your help.

How do I create a measure that returns true if myID is contained in historyTable and false if it isn't? 

Thank you for your help in advance and please let me know if you miss any information.

1 ACCEPTED SOLUTION
johnt75
Super User
Super User

Is In History = IF ( ISEMPTY( RELATEDTABLE(HistoryTable) ), 0, 1 )

This is assuming that you have a 1-to-many relationship from CurrentTable to HistoryTable. You can put the columns you need from CurrentTable into a table visual and apply a filter to only show items where [Is In History] is 1. ( true / false values don't work when using a measure as a filter, you need to use numbers ).

View solution in original post

2 REPLIES 2
johnt75
Super User
Super User

Is In History = IF ( ISEMPTY( RELATEDTABLE(HistoryTable) ), 0, 1 )

This is assuming that you have a 1-to-many relationship from CurrentTable to HistoryTable. You can put the columns you need from CurrentTable into a table visual and apply a filter to only show items where [Is In History] is 1. ( true / false values don't work when using a measure as a filter, you need to use numbers ).

Anonymous
Not applicable

That worked beautifully! Thank you very much!

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