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
Anonymous
Not applicable

DAX Help - Lookup to return value

Hello Community,

I have a set of data in multipule tables I am looking to cross reference to return an alternative value.

The below images are of the tables and the data

 

LookUp1.PNG

 

 

 

 

 

 

 

LookUp2.PNG

 

 

 

 

 

 

 

 

 

I have made the below table to showing Run ID, Ref ID and Data.

LookUp3.PNG

 

 

 

 

 

 

 

What I am having trouble creating is a measure that returns a difference of the Run ID vs. the Ref ID

 

Example of what is expected;

In row 4 of the above table

Run ID 4 = Data 11

Ref ID 2 = (Run ID 2) = Data 8

The subtracted value of Run ID 4 from Ref ID 2 would be 3 (11-8).

If correct, the rows of the expected measure in the above table would be

Null

3 (8-5)

0 (7-7)

3 (11-8)

4 (9-5)

 

I have tried a few lookup options with this but not been able to achive the desired result.

Any suggestions appreciated!!

 

1 ACCEPTED SOLUTION
jdbuchanan71
Super User
Super User

Hello @Anonymous 

I did it two ways, one with measures and joins and the other as a set of calculated columns added to the ConFig table.

MeasuresMeasuresCalculated ColumnsCalculated Columns

I uploaded my .pbix file here for you to take a look at so you can decide which way you like best.

https://www.dropbox.com/s/n3ok5ikaesjeluo/RunAndRefData.pbix?dl=0

 

View solution in original post

2 REPLIES 2
jdbuchanan71
Super User
Super User

Hello @Anonymous 

I did it two ways, one with measures and joins and the other as a set of calculated columns added to the ConFig table.

MeasuresMeasuresCalculated ColumnsCalculated Columns

I uploaded my .pbix file here for you to take a look at so you can decide which way you like best.

https://www.dropbox.com/s/n3ok5ikaesjeluo/RunAndRefData.pbix?dl=0

 

Anonymous
Not applicable

@jdbuchanan71 ,

Thanks this has me pointed in the right direction!

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.