cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
YAtre Frequent Visitor
Frequent Visitor

Look Up Value Help

I'm new at DAX.  I am trying to lookup Escalation Multipliers based on Notice to Proceed (NTP Yr) OR Mid-point of Construction (MPC Yr) OR Substantial/Final Completion (SC/FC Year).

 

In Excel, my formula would look something like this 

=IF([@[NTP YR]]="",VLOOKUP([@[SC/FC YR]],Table7,2,FALSE),VLOOKUP([@[NTP YR]],Table7,2,FALSE)) - It was based on just 2 conditions. However, I'm adding another condition in Power BI.

 

In Power BI, I have created a custom column called Escalation Multiplier. I have Years & corresponding escalation rates in a separate table called Escalation. 

 

If MPC Yr is available, it is to lookup the corresponding year in Escalation Table to pull the value. 

If MPC Yr is blank, it is to use NTP Yr to lookup the corresponding year in Escalation Table to pull the value. 

If NTP Yr is blank, it is to use SC/FC Yr to lookup the corresponding year in Escalation Table to pull the value. 

 

Currently, I am using the following formula

Escalation Multiplier = lookupvalue(Escalation1[Multiplier],Escalation1[Year],Append1[MPC YR]) || if(isblank(append1[MPC YR]),lookupvalue(escalation1[multiplier],escalation1[year],append1[NTP YR])) || if(isblank(Append1[NTP YR]),lookupvalue(Escalation1[Multiplier],Escalation1[Year],Append1[SC/FC YR]))

 

It gives me True or False instead of actual escalation multipliers so obviously I'm missing something. Could you please help me out. 

1 ACCEPTED SOLUTION

Accepted Solutions
YAtre Frequent Visitor
Frequent Visitor

Re: Look Up Value Help

Solved it!

 

switch(TRUE(),not isblank(Append1[MPC YR]),lookupvalue(Escalation1[Multiplier],Escalation1[Year],Append1[MPC YR]),isblank(Append1[MPC YR]),lookupvalue(Escalation1[Multiplier],Escalation1[Year],Append1[NTP YR]),isblank(Append1[NTP YR]),lookupvalue(Escalation1[Multiplier],Escalation1[Year],Append1[SC/FC YR]))

View solution in original post

1 REPLY 1
YAtre Frequent Visitor
Frequent Visitor

Re: Look Up Value Help

Solved it!

 

switch(TRUE(),not isblank(Append1[MPC YR]),lookupvalue(Escalation1[Multiplier],Escalation1[Year],Append1[MPC YR]),isblank(Append1[MPC YR]),lookupvalue(Escalation1[Multiplier],Escalation1[Year],Append1[NTP YR]),isblank(Append1[NTP YR]),lookupvalue(Escalation1[Multiplier],Escalation1[Year],Append1[SC/FC YR]))

View solution in original post

Helpful resources

Announcements
Coming Soon: T-Shirt Design Contest

Coming Soon: T-Shirt Design Contest

Keep your eyes open for our upcoming T-shirt design contest!

Meet the 2020 Season 1 Power BI Super Users!

Meet the 2020 Season 1 Power BI Super Users!

It’s the start of a new Super User season! Learn all about the new Super Users and brand-new tiered recognition system.

Super User Challenge: Can You Solve These?

Super User Challenge: Can You Solve These?

We're celebrating the start of the New Super User season with our first ever Super User 'Can You Solve These?' challenge.

Power BI Desktop Update - February 2020

Power BI Desktop Update - February 2020

We are super excited for our update this month, as we are releasing two of our top community requests!

Power Platform Online Conference

Power Platform Online Conference

Join us for the first ever Power Platform Online Conference!

Top Solution Authors