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
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
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.