Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Help with Vlookup using same column for search value and column value

Hi everyone,   I cant get my head around this problem in Power BI. I´m adding a new column to my table and want to check lookup if the same ID has value in both the column "F" and "L", but on diffe...
  • tamerj1's avatar
    tamerj1
    4 years ago

    Anonymous 

    Please try

    =
    IF (
        TableName[ID]
            IN VALUES ( TableName[L] )
                && TableName[ID] IN VALUES ( TableName[F] ),
        1,
        0
    )
  • tamerj1's avatar
    tamerj1
    4 years ago

    Anonymous 
    Please use

    =
    VAR CurrentIDTable =
        CALCULATETABLE ( TableName, ALLEXCEPT ( TableName, TableName[ID] ) )
    VAR FValue =
        SUMX ( CurrentIDTable, TableName[F] )
    VAR LValue =
        SUMX ( CurrentIDTable, TableName[L] )
    RETURN
        IF ( FValue > 0 && LValue > 0, 1, 0 )