Forum Discussion

VictorV's avatar
VictorV
Icon for Helper I rankHelper I
2 years ago
Solved

Get column matching name base on key

Hi everyone, need help on this one. I use data from table 2, but sometimes the name is not exactly, I want the name it match with the Name form other table that having same code, however sometimes th...
  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi VictorV ,
    Based on the data you provided, I did the following:
    Create a column 

    Column = 
    IF(
        IFERROR(LOOKUPVALUE('Table 1'[Name],'Table 1'[Code],'Table 2'[Code]),'Table 2'[Name]) <> BLANK(),
        IFERROR(LOOKUPVALUE('Table 1'[Name],'Table 1'[Code],'Table 2'[Code]),'Table 2'[Name]),
        'Table 2'[Name]
        )

    Final output

    Best regards,

    Albert He

     

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