Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
YcnanPowerBI
Helper II
Helper II

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]

1 ACCEPTED SOLUTION
lbendlin
Super User
Super User

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

View solution in original post

2 REPLIES 2
lbendlin
Super User
Super User

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

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

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.