This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. We're covering it all. You won't want to miss it.
Learn moreLevel up your Power BI skills this month - build one visual each week and tell better stories with data! Get started
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
Check out the April 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 37 | |
| 29 | |
| 28 | |
| 21 | |
| 18 |
| User | Count |
|---|---|
| 66 | |
| 36 | |
| 29 | |
| 25 | |
| 24 |