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

Get inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.

Reply
PBIn00b
Advocate II
Advocate II

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
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code FABINSIDER for a $400 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

Check out the February 2025 Power BI update to learn about new features.

March2025 Carousel

Fabric Community Update - March 2025

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

Top Solution Authors