cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
NaderSaeed
Helper I
Helper I

Start the Day from 7AM to 7AM

I want a conditional column that start the day from 7AM to 7AM instead of 0:00 to 0:00

For exmaple, for the below data,

NaderSaeed_0-1618853462030.png

How can I write the function to return this in a calcualted column?

Thank you 🙂

 

1 ACCEPTED SOLUTION
amitchandak
Super User IV
Super User IV

@NaderSaeed , Try a new column like

Switch( true() ,
[Start Time] >= date([Start Time]) + time(7,0,0) && [Start Time] < date([Start Time])+1 + time(7,0,0) ,date([Start Time]) ,
[Start Time] <= date([Start Time]) + time(7,0,0), date([Start Time]) -1,
date([Start Time]) +1
)



Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Dashboard of My Blogs !! YouTube Channel !! Connect on Linkedin

Proud to be a Super User!

View solution in original post

3 REPLIES 3
NaderSaeed
Helper I
Helper I

Hi @amitchandak 

 

I'm getting this error when I refer to the Start Time Column inside the date function.

Too few arguments were passed to the DATE function. The minimum argument count for the function is 3.

amitchandak
Super User IV
Super User IV

@NaderSaeed , Try a new column like

Switch( true() ,
[Start Time] >= date([Start Time]) + time(7,0,0) && [Start Time] < date([Start Time])+1 + time(7,0,0) ,date([Start Time]) ,
[Start Time] <= date([Start Time]) + time(7,0,0), date([Start Time]) -1,
date([Start Time]) +1
)



Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Dashboard of My Blogs !! YouTube Channel !! Connect on Linkedin

Proud to be a Super User!

View solution in original post

It worked for me after changing the Date function to Datevalue function.

 

Thank you so much. 🙂

Helpful resources

Announcements
PBI User Groups

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are You Ready?

Test your skills now with the Cloud Skills Challenge.

Top Solution Authors