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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
TotunG
Resolver I
Resolver I

Fixing LOOKUPVALUE Calculated Column Formula

I have a LOOKUPVALUE formula that previously worked before I added more 'Years' of data. The formula works by trying to find the a value in a table by looking at a code product code and matching it with the product code in the same row. 

 

However, because I have added more rows of data which has 'duplicate' product codes (as they are from prior years), this has now broken as it obviously there are multiple product codes that are found. 

 

I thought my 'Year' slicer that is related to the main table would allow this column to calculate still as it should be filtering the main table LOOKUPVALUE is searching? 

 

Would a normal measure be better instead and if so, how would I achieve this?

 

Max Value = LOOKUPVALUE ( 'Table'[Value],'Table'[Product Code],'Table2'[Product Code])
 
Any help / explanation is appreciated. 
2 REPLIES 2
v-zhangti
Community Support
Community Support

Hi, @TotunG 

 

Can you provide sample data for testing? Sensitive information can be removed in advance. What kind of expected results do you expect? You can also show it with pictures. I look forward to your response.

 

Best Regards,

Community Support Team _Charlotte

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

amitchandak
Super User
Super User

@TotunG , Try like

 

Max Value = MaxX(Filter('Table','Table'[Product Code]= 'Table2'[Product Code]), 'Table'[Value])

 


refer 4 ways (related, relatedtable, lookupvalue, sumx/minx/maxx with filter) to copy data from one table to another
https://www.youtube.com/watch?v=Wu1mWxR23jU
https://www.youtube.com/watch?v=czNHt7UXIe8

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

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.

Top Solution Authors
Top Kudoed Authors