Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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,
How can I write the function to return this in a calcualted column?
Thank you 🙂
Solved! Go to Solution.
@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
)
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.
@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
)
Hello,
Ive tried this formula with my date column
SWITCH( true() ,
[OccurrenceTimeStamp] >= date([OccurrenceTimeStamp]) + time(7,0,0) & [OccurrenceTimeStamp] < date([[OccurrenceTimeStamp]])+1 + time(2,59,0) ,date([OccurrenceTimeStamp]) ,
[[OccurrenceTimeStamp]] <= date([OccurrenceTimeStamp]) + time(3,0,0), date([OccurrenceTimeStamp]) -1,
date([OccurrenceTimeStamp]) +1
)
(trying to do 2:59 AM - 3:00AM as one day)
but am getting this error when I hit apply:
do you have any suggestions?
Hello SuperUser,
This works like a charm.
Any idea how to get month starting on the last day of prevouis month till this month less 1 day?
Example month starts on 31/03/2021 & ends 29/04/2021.
Thanks Stephen
It worked for me after changing the Date function to Datevalue function.
Thank you so much. 🙂
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
112 | |
100 | |
77 | |
74 | |
49 |
User | Count |
---|---|
146 | |
108 | |
106 | |
90 | |
62 |