Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Calculated Column from Another Table

I have two tables with application ID in both table having relationship.   First Table   Application ID Closed DateTime Tat Closed Flag 1 23-09-2021 30 No 1 24-09-2021 45 Yes ...
  • Greg_Deckler's avatar
    4 years ago

    Anonymous This is essentially Lookup Min/Max: Lookup Min/Max - Microsoft Power BI Community. In your case:

    TAT Column =
      VAR __Date = MAXX(FILTER(RELATEDTABLE('First Table'),[Closed Flag]="Yes"),[Closed DateTime])
      VAR __Tat = MAXX(FILTER(RELATEDTABLE('First Table'),[Closed Flag]="Yes" && [Closed DateTime]=__Date),[Tat])
    RETURN
      __Tat