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.
Hello -
I am trying to create a Turn around time calculation using a date for opened and closed. When the file has nothing in the date closed column, I want the calculation to be against another date in a key table I have. Is that possible to do with date diff? See screen shot of data and current calculated column for date diff - but note when there is not closed date, it remains blank.
Different table has the refresh month date as a date key
Solved! Go to Solution.
@amiller5 try this:
Number of Months =
DATEDIFF(
'Table'[Open Date Column],
COALESCE (
'Table'[Closed Date Column],
CALCULATE ( MAX ( 'Key Date Table'[Key Date Column] )
),
MONTH
)
I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make effort to give Kudos to whoever helped to solve your problem. It is a token of appreciation!
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
@amiller5 try this:
Number of Months =
DATEDIFF(
'Table'[Open Date Column],
COALESCE (
'Table'[Closed Date Column],
CALCULATE ( MAX ( 'Key Date Table'[Key Date Column] )
),
MONTH
)
I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make effort to give Kudos to whoever helped to solve your problem. It is a token of appreciation!
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
@amiller5 - Yes, it is possible. Is there a relationship between these two date columns? The sample syntax is like below.
Measure =
Switch(TRUE(),
Table[Date1] = "", DATEDIFF('Table'[StartDate],'Table'[End Date1],MONTH),
DATEDIFF('Table'[StartDate],'Table'[End Date2],MONTH),
)
No - the date key and the service 1 table do not have a relationship. The date key table is an input table for me to calculate other measures on. We use this specifically for looking at KPIs but retrospecitvely - so we are grabbing updated data in July to assess June's measures.
Maybe give this a try.
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.