Forum Discussion
kaka
9 years agoHelper II
How 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
kaka
9 years agoHelper II
Ok, so that would be an unnecessary column for me because what am actually doing in DAX is grabbing the maximum date from the table and then subtracting it's hour by 5. So, am creating a column called MaxDateFiveHourDiff:
MaxDateFiveHourDiff = MAX(due_date) - 5 hours. Question is, how do you subtract the 5 in DAX ?
danrmcallister
9 years agoResolver II
Try this in DAX:
MaxDateFiveHourDiff = MAX(Table1[DateTime]) - 5/24