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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
hlynurgudna
Frequent Visitor

Measure that checks if values from table is equal to another table

Hi 

 

I have a problem that I cant seem to figure out how to solve, have been browsing through this forum and I cant find anything that works for me

I want to create a measure "X" that gives me 1 or 0 depending if two conditions are met

 

I have a "Letter Code" which is from Table1, "Type" & "Doc exp" from Table2 and Date from Date table.
Measure2 and Measure3 show a specific date when an event occurs

 

hlynurgudna_4-1643144347972.png

 

On top of that I also have Activity from Table3

 

hlynurgudna_3-1643143992968.png

 

What I want to be able to give the measure the value 1 if Table1[Type] is equal to Table3[Activity], and the Date of that activity is before the date on Measure2&3
By doing that I could then filter out measure2&3 out of the upper table so it wouldnt appear

The data is in a cube so I am not able to easily modify the data

 

Hope I made myself clear enough

 

Best regards

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

Hi, 

According to your description, I can roughly understand your requirement, I think you can try this measure to achieve your needs:

This is the test data I created based on your description:

vrobertqmsft_0-1643357053658.png

vrobertqmsft_1-1643357053660.png

Measure =

IF(MAX('Table1'[Type])=MAX('Table3'[Activity])&&MAX('Table3'[Date])<=[Measure2]&&MAX('Table3'[Date])<=[Measure3],1,0)

 

And you can create a table chart to place it like this to get what you want:

vrobertqmsft_2-1643357053664.png

 

You can download my test pbix file below

 

If this result is not what you want, you can post some sample data(without sensitive data) and your expected result.

How to Get Your Question Answered Quickly 

Thank you very much!

 

Best Regards,

Community Support Team _Robert Qin

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-robertq-msft
Community Support
Community Support

Hi, 

According to your description, I can roughly understand your requirement, I think you can try this measure to achieve your needs:

This is the test data I created based on your description:

vrobertqmsft_0-1643357053658.png

vrobertqmsft_1-1643357053660.png

Measure =

IF(MAX('Table1'[Type])=MAX('Table3'[Activity])&&MAX('Table3'[Date])<=[Measure2]&&MAX('Table3'[Date])<=[Measure3],1,0)

 

And you can create a table chart to place it like this to get what you want:

vrobertqmsft_2-1643357053664.png

 

You can download my test pbix file below

 

If this result is not what you want, you can post some sample data(without sensitive data) and your expected result.

How to Get Your Question Answered Quickly 

Thank you very much!

 

Best Regards,

Community Support Team _Robert Qin

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

hlynurgudna
Frequent Visitor

I think this is what I am trying to do, but I need to do this in a measure, not by adding a column 

Column = IF(Table1[Country]&Table1[Currency]=Table1[Country]&RELATED(Table2[Currnecy]),"Government Bond","Coprorate Bond")

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.