Forum Discussion

TotunG's avatar
TotunG
Resolver I
3 years ago

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

  • v-zhangti's avatar
    v-zhangti
    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.