March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
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 |
1 | 25-09-2021 | 56 | Yes |
Second Table
Application ID | TAT (Calculated Col) |
1 | 56 |
I need to create a calculated column "TAT" in the second table which brings the TAT value for a maximum ClosedDateTime of a Application ID and Closed Flag should be "Yes".
Please help me with DAX for this.
Solved! Go to Solution.
@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
@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
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
114 | |
76 | |
57 | |
52 | |
44 |
User | Count |
---|---|
168 | |
116 | |
63 | |
57 | |
50 |