cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
BDA2 Member
Member

How to Lookup Value From 2 different tables into 1 single column

I have a full sets of (overall) sum value from quote - Table A

I have full sets of line item value from quote - Table B, (currently empty)

 

Is there any measure or custom conditional collumn or DAX code that I can lookup value in Table B from Table A, by using quote number?

It is a little unusual, but the idea behind was to reduce the number of datasets from source file.

 

Which means after lookup, the visual result will be in 1 combined table.

 

Shown below screenshot.

 

LookUp Value to Combine table.jpg

5 REPLIES 5
Super User
Super User

Re: How to Lookup Value From 2 different tables into 1 single column

@BDA2 why dont you merge them in power query?  or append creating 2 separate columns, create a conditional column to combine them and then remove the other columns?


Did I answer your question? Mark my post as a solution.
Proud a to be a Datanaut!
SivaMani Senior Member
Senior Member

Re: How to Lookup Value From 2 different tables into 1 single column

Please do have a look at the below link,

 

https://msdn.microsoft.com/en-us/query-bi/dax/lookupvalue-function-dax

 

This function will help you.

BDA2 Member
Member

Re: How to Lookup Value From 2 different tables into 1 single column

Hi @vanessafvg @SivaMani,

 

I tried both approach, but it don't seemed to work.

I can share the PBIX file, but please allow me to remove all the confidential information first.

 

The merge queries duplicates all the final model pricing and does not shows sum pricing of all the line item when visualed on table.

LookupValue can only be exact match, my quote# is a running number.

 

Seems like the simplest way is to import more datasets.

SivaMani Senior Member
Senior Member

Re: How to Lookup Value From 2 different tables into 1 single column

Sure

Super User
Super User

Re: How to Lookup Value From 2 different tables into 1 single column

@BDA2 feel free to send it to me


Did I answer your question? Mark my post as a solution.
Proud a to be a Datanaut!