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!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
Hi All,
I am trying to calculate the days difference between two dates e.g. create and resolved some tickets are not resolved hence the dates are blank so to handle that i created "Resolved 2" however i use this in the "Incident Age 2" formula its given me wierd result (see below) not sure why. For the dates which are not blank the result is correct. What am i doing wrong?
Solved! Go to Solution.
Note you can use DATEDIFF to return the result in hours or minutes too, and then divide by 24, etc. to get days in decimal form. You could also use your Resolved 2 expression in a variable and use that in your Age measure (instead of a separate measure).
Regards,
Pat
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
Note you can use DATEDIFF to return the result in hours or minutes too, and then divide by 24, etc. to get days in decimal form. You could also use your Resolved 2 expression in a variable and use that in your Age measure (instead of a separate measure).
Regards,
Pat
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
@mahoneypat i just noticed a slight difference in the result , please see below. The result for the below example should 8.95 but with our calculation its coming up 8.96 what could be wrong ?
Looks like a rounding error. Maybe return MINUTES in the DATEDIFF instead?
Regards,
Pat
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
@mahoneypat i returned it in SECONDS and then divided by /24/60/60 to convert it in days and it solved the issue.
@mahoneypat thanks for this, it was the simplest solution and it worked for me. Kudos to you.