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!Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.
Hi All,
I have a requirement to show a new column based on two other columns.
Scenario: For every contract number, check for the 'Contract status' where status="Negotiation" and then display the first or the earliest contract status date in new column.
Note: 'Status=Negotiation' will be repeating for each conract no. and we want to show the first occurance date.
Sample data:
Contract No. | Contract Status | Contract Status Date |
22 | Submitted | 1/5/2021 |
22 | In-Progress | 1/8/2021 |
22 | Negotiation | 1/15/2021 |
22 | Negotiation | 1/25/2021 |
22 | Negotiation | 1/27/2021 |
22 | Approved | 1/30/2021 |
23 | Submitted | 5/19/2022 |
23 | In-Progress | 5/22/2022 |
23 | Negotiation | 5/27/2022 |
23 | Negotiation | 5/29/2022 |
23 | Negotiation | 5/30/2022 |
23 | Approved | 5/30/2022 |
Expected output:
Contract No. | Negotiation Status | First Negotiation Status Date |
22 | Negotiation | 1/15/2021 |
23 | Negotiation | 5/27/2022 |
Could someone please advise on how this can be achieved using DAX as I will have to use this to derive other calculated columns?
Thank you.
Solved! Go to Solution.
Hi @POSPOS
Try the calculated column with dax:
pls try this
m2 =
VAR _t1 = ALLEXCEPT('Table','Table'[Contract No.])
VAR _t2 = MAX('Table'[Contract Status])="Negotiation"
VAR _Results = CALCULATE(MIN('Table'[Contract Status Date]),_t1,'Table'[Contract Status]="Negotiation")
RETURN IF(_t2,
_Results)
pls try this
m2 =
VAR _t1 = ALLEXCEPT('Table','Table'[Contract No.])
VAR _t2 = MAX('Table'[Contract Status])="Negotiation"
VAR _Results = CALCULATE(MIN('Table'[Contract Status Date]),_t1,'Table'[Contract Status]="Negotiation")
RETURN IF(_t2,
_Results)
Hi @POSPOS
Try the calculated column with dax:
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.