Forum Discussion

Edmundas's avatar
Edmundas
Frequent Visitor
3 years ago
Solved

Lookup value

Hi there,

 

I have a table with employee's name and his/her position and need to write formula to get results as it is shown in column 'Position_Full'. Lookupvalue didn't work.. Any help please?

 

  • Hi,

    Please check the below picture and the attached pbix file.

     

     

     

    Position_Full CC = 
    VAR _currentname = 'Table'[Name]
    VAR _lookuptable =
        SUMMARIZE (
            FILTER ( 'Table', 'Table'[Position] <> BLANK () ),
            'Table'[Name],
            'Table'[Position]
        )
    RETURN
        MAXX (
            FILTER ( _lookuptable, 'Table'[Name] = _currentname ),
            'Table'[Position]
        )

     

2 Replies

  • Edmundas's avatar
    Edmundas
    Frequent Visitor

    It worked perfect! Thank you so much!

  • Hi,

    Please check the below picture and the attached pbix file.

     

     

     

    Position_Full CC = 
    VAR _currentname = 'Table'[Name]
    VAR _lookuptable =
        SUMMARIZE (
            FILTER ( 'Table', 'Table'[Position] <> BLANK () ),
            'Table'[Name],
            'Table'[Position]
        )
    RETURN
        MAXX (
            FILTER ( _lookuptable, 'Table'[Name] = _currentname ),
            'Table'[Position]
        )