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.
Hi All,
Need help with calculating date difference for the projects which has only tasks "Enquiry Submitted" and "Approval Sent"
"Approval sent" should consider start date and "enquiry submitted "task should consider End date.
@amitchandak
Project | Task | Start Date | end date |
AC1 | Enquiry Submitted | 12-06-2022 | 09-06-2022 |
AC1 | Approval Sent | 19-06-2022 | 12-06-2022 |
AC2 | Enquiry Submitted | 05-06-2022 | 09-06-2022 |
AC3 | Enquiry Submitted | 04-06-2022 | 05-06-2022 |
AC4 | Enquiry Submitted | 1-06-2022 | 05-06-2022 |
AC4 | Approval Sent | 02-06-2022 | 01-07-2022 |
AC4 | Feedback submitted | 04-06-2022 | 09-06-2022 |
AC6 | Enquiry Submitted | 11-09-2022 | 21-06-2022 |
AC6 | Approval Sent | 21-06-2022 | 22-06-2022 |
Expected o/p:
Projects AC1 and AC6 to be considered
Ac1 date diff 19-06-2022 minus 09-06-2022 =10days
Ac6 date diff 21-06-2022 minus 21-06-2022 = 0day
Solved! Go to Solution.
Hi,
Thank you for your feedback.
Do you mean that the card visualization shows 5 as a result?
Please check the below meausre and the attached pbix file.
Expected avg measure: =
AVERAGEX(VALUES(Data[Project]), [Date diff by condition measure:])
Hi,
Please check the below picture and the attached pbix file.
It is for creating a measure.
Date diff by condition measure: =
VAR _conditionone =
COUNTROWS (
FILTER ( Data, Data[Task] IN { "Enquiry Submitted", "Approval Sent" } )
) = 2
VAR _conditiontwo =
COUNTROWS ( VALUES ( Data[Task] ) ) = 2
RETURN
DATEDIFF (
CALCULATE ( MAX ( Data[end date] ), Data[Task] = "Enquiry Submitted" ),
CALCULATE ( MAX ( Data[Start Date] ), Data[Task] = "Approval Sent" ),
DAY
)
* DIVIDE ( _conditionone, _conditiontwo )
Hi @Jihwan_Kim ,
Thank you for the response.It is working when I drag the project and "date diff by condition measure" into a table.
Is there a way to show the average of all these datediffs in a single card.
Thanks
Hi,
Thank you for your feedback.
Do you mean that the card visualization shows 5 as a result?
Please check the below meausre and the attached pbix file.
Expected avg measure: =
AVERAGEX(VALUES(Data[Project]), [Date diff by condition measure:])
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.