Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hi, All.
I am struggling to figure out how to get, in total hours, the difference between a start date column and the current/local time in Direct Query mode due to restrictions. I need the result to be in total decimal hours. Any thoughts or advice?
Thank you
Solved! Go to Solution.
Which source are you using? This measure worked with SQL Server.
TotalHrsFromNow =
SUMX ( DQDate, ( NOW () - DQDate[Date] ) / 24 )
Pat
You can use a measure.
calculate your local time using NOW() + yourTimezoneOffset / 24
and take a look at the DATEDIFF() function.
DATEDIFF was my first stop but it's not supported while using direct query. Neither is creating a DateTime.LocalNow using query editor. I will keep trying with a measure and see what I can come up with.
Which source are you using? This measure worked with SQL Server.
TotalHrsFromNow =
SUMX ( DQDate, ( NOW () - DQDate[Date] ) / 24 )
Pat
Oracle, and the measure is working now. I must have been missing something at first. Thank you!
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.