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
Fátima
Helper II
Helper II

DAX help - Measure based on other measure conditions

Hi!

 

I need to obtain the state of some registries based on some measures.

 

I have some registries like this:

 

R1

R2

R3

R4

 

Then, I have two tables that tells me if those registries have completed some actions, A registry can complete an action several times, in which case we will only need the last one:

action 1

ID   Registry   Date

1     R1            01/01/2022

2     R1            02/01/2022

3     R3            01/01/2022

4     R4            02/02/2022

 

action 2

ID   Registry   Date

1     R1            01/01/2022

2     R3            01/01/2022

3     R4            02/02/2022

 

For each of those tables I have a measure that gives me the Id if the action is active, let's call them measure1 and mesure2, which results represented on the tables would be:

 

action 1

ID   Registry   Date                 measure1

1     R1            01/01/2022                                    --> This one would be blank, because it's not active, since the same registry has                                                                                          made the same action on a later date.

2     R1            02/01/2022      2

3     R3            01/01/2022      3

4     R4            02/02/2022      4

 

action 2

ID   Registry   Date                  measure2

1     R1            01/01/2022       1

2     R4            02/02/2022       2

 

I would need a measure on the first table that returns "action 2" if it has it, "action 1" if it only has action 1 and not action 2, and "Nothing" if it has none, so it would be:

 

R1     action 2

R2     nothing

R3     action1

R4     action2

 

It's important this is a measure, because I'm going to have to filter it by date, so for example if I selected everything that has happened until 01/01/1022, the result of the measure would be:

 

R1     action 2

R2     nothing

R3     action1

R4     nothing

 

Is this possible?

 

Thanks! Regards!

0 REPLIES 0

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.