Forum Discussion
Anonymous
6 years agoNot applicable
DAX IF statement based on TIME
Happy New Year Power BI Community!
I am trying to add a column to modify a date based on the time a request came in. If a request comes in after 13:59, the clock does not start ticking until the next day. I wrote this DAX, but it won't recognize the 13:59. How should I format the time?
New Created Date = If('Task List'[Created Time]> 1359,'Task List'[Created Date]+1,'Task List'[Created Date])
Help is appreciated! Thanks!
Hi Anonymous
try TIME function https://docs.microsoft.com/en-us/dax/time-function-dax
New Created Date = If('Task List'[Created Time]> TIME(13,59,59),'Task List'[Created Date]+1,'Task List'[Created Date])do not hesitate to give a kudo to useful posts and mark solutions as solution
- Anonymous6 years ago
Awesome! Worked like a charm. Thanks!!
2 Replies
- az38Community Champion
Hi Anonymous
try TIME function https://docs.microsoft.com/en-us/dax/time-function-dax
New Created Date = If('Task List'[Created Time]> TIME(13,59,59),'Task List'[Created Date]+1,'Task List'[Created Date])do not hesitate to give a kudo to useful posts and mark solutions as solution
- AnonymousNot applicable
Awesome! Worked like a charm. Thanks!!