Forum Discussion
kaka
Helper II
9 years agoHow to subtract hours from DateTime data using DAX?
I am creating a new column using DAX where I need to display a date by subtracting five hours from it. So, if my date is 2016-12-21 09:40 pm, it should be 2016-12-21 04:40 pm. The function...
- 9 years ago
Try this in DAX:
MaxDateFiveHourDiff = MAX(Table1[DateTime]) - 5/24
Shamsbutt
Helper II
7 years agoCreate new column with following Dax
Column = 'DateTime'[YourColumn] - TIME(0, 5, 0)
Hope it'll help.
Anonymous
3 years agoNot applicable
this works like a magic. thanks. however, the TIME format is TIME(HH,MM,SS)