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.
Need help to find out how i can get the hours between two dates (date format : 17-07-2018 16:13:25) . I need to calculate this by measure so that i am not including any new column.
Thank you
Solved! Go to Solution.
Hi @Anonymous
I've created a sample as below:
Measure 4 = DATEDIFF(MAX('Table (3)'[Start Date]),MAX('Table (3)'[End date]),HOUR)
Hi @Anonymous
Any updates?
Hi @Anonymous
I've created a sample as below:
Measure 4 = DATEDIFF(MAX('Table (3)'[Start Date]),MAX('Table (3)'[End date]),HOUR)
You can use the datediff function in DAX.
DATEDIFF(<start_date>, <end_date>, <interval>)
Datediff works fine for new column but its not working when i am trying to use a new measure using DAX
Hi @Anonymous
DATEDIFF should work in measure as well, please share your dummy data and i'd like to draw up it for you.
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.