Forum Discussion

YcnanPowerBI's avatar
YcnanPowerBI
Icon for Helper II rankHelper II
2 years ago
Solved

Adding a day if time = 12:00:00 AM

Morning all - I am running into an issue with a custom column.  I want to add a day to a date field if my time field = 12:00:00 AM but it is not working.  Not sure where I am going wrong here, but hoping it is a simple issue

 

I want to add a day to [Shift date] if [Shift end time.1] = 12:00:00 AM

 

What I am using now that is not working:

if [Shift end time.1] = #duration(0,24,0,0)
then
Date.AddDays([Shift date],1) else [Shift date]

  • if Number.From([Shift end time.1]) = 0
    then
    Date.AddDays([Shift date],1) else [Shift date]

2 Replies

  • if Number.From([Shift end time.1]) = 0
    then
    Date.AddDays([Shift date],1) else [Shift date]

    • YcnanPowerBI's avatar
      YcnanPowerBI
      Icon for Helper II rankHelper II

      It worked, thank you so much!  And wow, I was way off, but thanks to people like you, learning more every day!