Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
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
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the September 2025 Power BI update to learn about new features.