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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
VJ
Frequent Visitor

Help with DAX to do a lookup based on the measure value

Hi,

 

I am new to DAX and I am facing  issues writing DAX to do a lookup on a table based on the measure value  and I am not sure if its even possible in power BI.  

 

My Scenario is I am using an import model in power BI and my source is SQL server i am able to build the measures successfully but when i am trying to compare the  measure value  to reference table and build a measure out of it I am facing the issue i am not able to write DAX to do that. 

 

Example of what i am trying to accomplish if i have a Average household income of 3.73 my calculation based on the reference table should be like this.

 

3.73 = 20160+(0.73*4140) 

 

20160 = householdincome based on lookup for householdsize  of 3 

4140 = step increase basically step increase is difference of amount  (please look at the screen shot below)

 

Below are some screen shots attached for referece.

 

your help is greatly appreciated thank you.

measure.PNG

 

lookup table.PNG

 

 

 

 

 

 

1 ACCEPTED SOLUTION
v-sihou-msft
Employee
Employee

 @VJ

 

You can lookup value based on the result of measure. 

 

 

In your scenario, if you want to lookup 3 based on 3.73, you need to ROUNDDOWN() the result from measure. 

 

Column = LOOKUPVALUE(Table1[result],Table1[Value],ROUNDOWN([Measure],0))

Regards,

View solution in original post

1 REPLY 1
v-sihou-msft
Employee
Employee

 @VJ

 

You can lookup value based on the result of measure. 

 

 

In your scenario, if you want to lookup 3 based on 3.73, you need to ROUNDDOWN() the result from measure. 

 

Column = LOOKUPVALUE(Table1[result],Table1[Value],ROUNDOWN([Measure],0))

Regards,

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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