Forum Discussion

maibacherstr's avatar
maibacherstr
Helper III
4 years ago
Solved

Modify the LookUpValue function when Search_ColumnName1 contains duplicates

Hello Community,   I have a =lookupvalue formula running in my DAX, and all was good. But due to a project requirement, today I had to update my query filter which caused my dataset to increase in ...
  • Anonymous's avatar
    Anonymous
    4 years ago

    Hi maibacherstr,

    I think you can add more search columns to the lookupvalue function to prevent the duplicate value and set the 'alternate Result' option with aggregate function to handle the excepted duplicate results.

    formula =
    LOOKUPVALUE (
        Table2[Result],
        Table2[SearchColumn], Table1[Column],
        Table2[ProjectName], Table1[ProjectName],
        MAX ( Table2[Result] )
    )

    LOOKUPVALUE function (DAX) - DAX | Microsoft Docs

    Regards,

    Xiaoxin Sheng