Forum Discussion

yuvaraj86's avatar
yuvaraj86
Frequent Visitor
6 years ago

Convert the dax function now() to local time with DAX

Power BI stores dates and times as a number representing the number of days since 1900-Jan-0 , plus the fractional portion of a 24 hour day: ddddd.tttttt . The values to the left of the decimal place is the number of days and the value to the right of the decimal place is the decimal representation of the 24 hr clock. 

 

So for eg if you want to subtract 4 hrs from the Now() or UTCNOW() function , 4/24 = 0.16667 , so your DAX would be 

now() -  .16667

similarly if you would like to subtract 5 hrs it be 5/24 = 0.20833

now() -  0.20833

 

Hope this helps someone