Forum Discussion
MichaelBristol
5 years agoFrequent Visitor
Lookup and Verify Three Columns on Another Table and Generate a Value
What I am trying to accomplish with no success is the following. Table 1 (Simplified for example) Unit Num A1111 B2222 C3333 Table 2 Date Unit ...
- 5 years ago
MichaelBristol
I created a column that returns the result you are looking for:Color Value = var __maxdate = MAXX( FILTER( 'Table 2', 'Table 2'[Unit] = 'Table 1'[Unit Num] ), 'Table 2'[Date] ) var __result = IF( ISEMPTY( FILTER( 'Table 2', 'Table 2'[Unit] = 'Table 1'[Unit Num] && 'Table 2'[Date] = __maxdate && 'Table 2'[NumColor] = "Red" ) ), 0, 5 ) return __result
Fowmy
Super User
5 years agoMichaelBristol
I created a column that returns the result you are looking for:
Color Value =
var __maxdate =
MAXX(
FILTER(
'Table 2',
'Table 2'[Unit] = 'Table 1'[Unit Num]
),
'Table 2'[Date]
)
var __result =
IF(
ISEMPTY(
FILTER(
'Table 2',
'Table 2'[Unit] = 'Table 1'[Unit Num] &&
'Table 2'[Date] = __maxdate &&
'Table 2'[NumColor] = "Red"
)
),
0,
5
)
return
__result
- MichaelBristol5 years agoFrequent Visitor
Your solution worked famously! Thank you.