Forum Discussion
Raj12
Helper III
2 years agoLookup 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...
- 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
Greg_Deckler
Community Champion
2 years agoRaj12 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