Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Latest Phase

Hello, Can someone help me? Please What measurement could I use to consider the most recent phase per HF - Unidade? In this example, the Help Flag phase was the most recent  
  • vojtechsima's avatar
    4 years ago

    Hello, Anonymous 
    You can do something like this (New Column in DAX)

    Measure = 
    var currentHF = table[HF_Unidade]
    var max_date = MAXX(FILTER(table, table[HF_Unidade] = currentHF), table[created_at])
    return MAXX(FILTER(table, table[created_at] = max_date && table[HF_Unidade] = currentHF ), table[current_phase])