The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
Hello!
I am new to Power BI. I need to add a "Status" column that will display "on time", "late", "not delivered".
If Planned Date is greater than or equal to Actual Date + 3 days, then "on time". If Planned Date is less than Actual Date + 3 days, then "late".
If Actual Date is not present, then the status should be "not delivered". Please help me write a formula in DAX.
The result should be like this:
Plan date | Fact date | Status |
31.03.2025 | 31.03.2025 | on time |
24.12.2024 | 09.01.2025 | late |
30.06.2025 | not delivered | |
11.02.2025 | 09.02.2025 | on time |
25.04.2025 | 28.04.2025 | on time |
25.04.2025 | 29.04.2025 | late |
Thank you in advance
Solved! Go to Solution.
Hi @NatalyZot ,
Welcome to Power BI! You can create a calculated column in your table using this DAX formula to determine the delivery Status as you described:
Status =
IF(
ISBLANK('Table'[Fact date]),
"not delivered",
IF(
'Table'[Plan date] >= 'Table'[Fact date] + 3,
"on time",
"late"
)
)
Make sure to replace 'Table' with the actual name of your table, and ensure both Plan date and Fact date are in date format.
Here's how it works:
If the Fact date (Actual Date) is blank → "not delivered"
Else if the Plan date is at least 3 days later than Fact date → "on time"
Otherwise → "late"
Let me know if you'd like to visualize this in a table or apply conditional formatting next!
Best regards,
Thank you very much for your help!
Hi @NatalyZot ,
Welcome to Power BI! You can create a calculated column in your table using this DAX formula to determine the delivery Status as you described:
Status =
IF(
ISBLANK('Table'[Fact date]),
"not delivered",
IF(
'Table'[Plan date] >= 'Table'[Fact date] + 3,
"on time",
"late"
)
)
Make sure to replace 'Table' with the actual name of your table, and ensure both Plan date and Fact date are in date format.
Here's how it works:
If the Fact date (Actual Date) is blank → "not delivered"
Else if the Plan date is at least 3 days later than Fact date → "on time"
Otherwise → "late"
Let me know if you'd like to visualize this in a table or apply conditional formatting next!
Best regards,
User | Count |
---|---|
15 | |
11 | |
8 | |
8 | |
7 |
User | Count |
---|---|
21 | |
20 | |
11 | |
10 | |
7 |