Forum Discussion

Raj12's avatar
Raj12
Icon for Helper III rankHelper III
2 years ago
Solved

Lookup Value corresponding to matching ID from another table based on a condition in Power Bi

Create calculated column (in table2)with Lookup Value corresponding to matching ID from another table(Table 1) based on a condition where output value2 ,is lookup value with highest priroity from Tab...
  • Greg_Deckler's avatar
    2 years ago

    Raj12 Maybe:

    Column = 
      VAR __ID = [Id2]
      VAR __Values = SELECTCOLUMNS( FILTER('Table 1', [Id1] = __ID), "__Value1", [Value1] )
      VAR __Result =
        SWITCH(TRUE(),
          "Pause" IN __Values, "Pause",
          "No Pause" IN __Values, "No Pause",
          "Other" IN __Values, "Other",
          BLANK()
        )
    RETURN
      __Result