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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Fab117
Helper IV
Helper IV

Circular dependency when applying LookUpValue

Hello,

 

I've 2 tables:

1. Table: NetReg_file

Code

Quantity

A

5

B

3

A

4

C

6

B

4

A

2

C

5

A

3

B

1

C

4

2. Table: Prices

Code

Standard price (GBP)

Net price (GBP)

A

1.00 $/unit

1.20 $/unit

B

1.20 $/unit

1.25 $/unit

C

1.40 $/unit

1.20 $/unit

 

 

To simplify future calculation, I'd like to add in table "NetReg_file" the corresponding prices in each line

=>

Updated table: NetReg_file

Code

Quantity

Standard price (GBP)

Net price (GBP)

A

5

1.00 $/unit

1.20 $/unit

B

3

1.20 $/unit

1.25 $/unit

A

4

1.00 $/unit

1.20 $/unit

C

6

1.40 $/unit

1.20 $/unit

B

4

1.20 $/unit

1.25 $/unit

A

2

1.00 $/unit

1.20 $/unit

C

5

1.40 $/unit

1.20 $/unit

A

3

1.00 $/unit

1.20 $/unit

B

1

1.20 $/unit

1.25 $/unit

C

4

1.40 $/unit

1.20 $/unit

 

 

I found a tuto to do it in Power Desktop with LookUpValue formulae:

Target: "NetReg_file"

Source: "Prices"

In Data Mode in Power Desktop (not Power Query)

Fab117_0-1672743786846.png

 

 

Select "New column"

Fab117_1-1672743786852.png

 

 

Then type formulae

Name new column= LOOKUPVALUE(Source Table[Field to copy], Source Table [Common field],Target Table[Common field])

For me:

SP = LOOKUPVALUE(Prices[Standard price (GBP)],Prices[GMM],NetReg_file[GMM])

NP = LOOKUPVALUE(Prices[Net price (GBP)],Prices[GMM],NetReg_file[GMM])

Where common value in both tables is field [GMM]

 

It works perfectly well with 1st formulae (SP = …).

But failed with 2nd one (NP = …). I've the error message:

 

Power BI error message.png

 

 

Would someone know how to solve this?

 

Happy new year

 

Fab

 

 

1 ACCEPTED SOLUTION
Fab117
Helper IV
Helper IV

I found the issue.

It was linked to relationship between the 2 tables:

 

Not fully sure to understand the why, but at least solved.

Power BI relationship.jpg

 

Thanks to all who looked at my issue.

 

Happy new year

 

Fab

 

View solution in original post

9 REPLIES 9
Fab117
Helper IV
Helper IV

I found the issue.

It was linked to relationship between the 2 tables:

 

Not fully sure to understand the why, but at least solved.

Power BI relationship.jpg

 

Thanks to all who looked at my issue.

 

Happy new year

 

Fab

 

johnt75
Super User
Super User

You could use Power Query to merge the 2 queries, joining them on the GMM column.

Thank you for looking at my issue.

This is also an option I'm assessing (link).

For now, I'm not sure which one would be more appropriate in my case.

 

Happy new year

 

Fab

AbbasG
Memorable Member
Memorable Member

@Fab117 refer to the following file, hope it helps.

Lookupvalue.pbix

 

Hi,

thanks for taking time looking at my issue.

I opened your demo file and it works perfectly.

But, don't know why, it fails when I apply to my case.

I scrapped all and repeated as you did (with minor spelling differences in fileads name). But still the error message:

Power BI error message3.png

 

It's very strange the content of the error message as it seems that Power BI understand it has to look all in NetReg_file table

 

To be noted that if I do first the net price column creation, it works and then failed when I try to create standard price one

Power BI error message4.png

=> it's really when cretaing the second column that I have the issue

AbbasG
Memorable Member
Memorable Member

@Fab117 share your file, with sample data(remove sensitive information) to help your further.

I don't know how to attach files (not sure I've the appropriate rights)

Power BI demo.png

AbbasG
Memorable Member
Memorable Member

@Fab117 dear, only super users can attach the file directly. You will need to publish it to one drive or similar service and then share a link to the file.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.