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
PBIn00b
Advocate I
Advocate I

Using LOOKUPVALUE with the same columns more than once

I am attempting to use LOOKUPVALUE to pull multiple columns of data from one table to another.  I am very familiar with using Excel VLOOKUP and INDEX MATCH, but I am new to using DAX.

 

I can get one LOOKUPVALUE formula to work fine, but when I attempt to create another, using the same data, I get a circular dependency error.

 

I have been told that I may need to use something like ALLEXCEPT, but I am not sure how that syntax would work.

 

Example formula:

 

1st Formula

LOOKUPVALUE('Table1'[Column2], 'Table1'[Column 1], 'Table2'[Column 1])

Returns Table1[Column2] Data

 

2nd Formula

LOOKUPVALUE('Table1'[Column3], 'Table1'[Column 1], 'Table2'[Column 1])

Returns a circular error

1 ACCEPTED SOLUTION

I reached out to Power BI support and they recommended I use the RELATED function.

 

It looks like it worked!

 

Create a relationship between the two tables, MANY to ONE

Then Column = RELATED('Column from Related Table')

 

 

View solution in original post

5 REPLIES 5
kcantor
Community Champion
Community Champion

I would recommend using the query editor to merge the queries.

https://www.lynda.com/Power-BI-tutorials/Merging-data/445425/477071-4.html





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




@kcantor ,

The link you posted is now broken. Can ytou post a new link that trains in that functionality?

 

Thank you!!

Thank you for your response!

 

One of the tables is a reference table with SKU information, the other is data is order data pulled from a system.  The pulled data would be a list of orders that would have a SKU column that looks like this:

 

SKU 1

SKU 1

SKU 1

SKU 3

SKU 2

SKU 3

SKU 1

 

I want to be able to look for each SKU in the reference table and pull information to the pulled data like description, etc...  I am not sure merging the queries would work in that case.  Then again, I am a PBI / DAX n00b.

I reached out to Power BI support and they recommended I use the RELATED function.

 

It looks like it worked!

 

Create a relationship between the two tables, MANY to ONE

Then Column = RELATED('Column from Related Table')

 

 

Hi, it seems I have the same problem as you but I'm also new do DAX. Could you please provide furthuer details on how to use the RELATED formula with the LOOKUPVALUE formula?

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.