Forum Discussion
Anonymous
4 years agoNot applicable
Group interval 15 min by value
Hello dear community. I have a question about the intervals. I currently have an Interval column which I made like this: Time.from (Number.RoundDown (96 * Number.From (Time.From ([column1])) / 1) ...
- 4 years ago
Anonymous
This should do it:NewTarget = var getHour = HOUR(Interval2[Time 1]) var getMinute = MINUTE(Interval2[Time 1]) var IntervalToText = FORMAT(Interval2[Interval ],"h:mm") var checkInterval = if(getMinute>=45,getHour & ":45 - " & getHour & ":59",IntervalToText) return checkInterval
Anonymous
4 years agoNot applicable
Hello vojtechsima ,
thank you for your reply.
No, its perhaps my bad.
I have already Time 1 and Interval and its working fine but I need column Target as yu see, the range xx:45 to xx:59 is not xx:45 but xx:45 - xx:59
If I had to say it litteraly
Example If I take 08:00
if Time 1 is between 08:00:00 and 08:14:59 then 08:00
If Time1 is between 08:15:00 and 08:29:59 then 08:15
If Time1 is between 08:30:00 and 08:44:59 then 08:30 otherwise 08:45 - 09:00)
Well this for every hour.
| Time 1 | Interval | Target |
| 08:12:14 | 08:00:00 | 08:00 |
| 09:19:48 | 09:15:00 | 09:15 |
| 09:35:23 | 09:30:00 | 09:30 |
| 09:45:59 | 09:45:00 | 09:45 - 09:59 |
vojtechsima
Super User
4 years agoAnonymous
This should do it:
NewTarget =
var getHour = HOUR(Interval2[Time 1])
var getMinute = MINUTE(Interval2[Time 1])
var IntervalToText = FORMAT(Interval2[Interval ],"h:mm")
var checkInterval = if(getMinute>=45,getHour & ":45 - " & getHour & ":59",IntervalToText)
return checkInterval
- Anonymous4 years agoNot applicable
Hello vojtechsima
Awesome. I didn't have to think about that at all, I had stayed on the grouping of values. A big thank you.- vojtechsima4 years ago
Super User
Anonymous , I am glad to hear that, please, if you could mark my original reply as the solution, so this threat is closed. Thank you
- Anonymous4 years agoNot applicable