Hello experts, I am working on a stats of meetings.
As the attached photo shows, this meeting lasts for 7 (duration_hour) hours which starts at 8 AM (date_hour). I need to duplicate this event 7 times by adding 1 hour at date_hour with each time.
The final result I want is :
date_hour | _time | The rest fields |
8 | 10/29/2020 8:00 | same |
9 | 10/29/2020 9:00 | same |
10 | 10/29/2020 10:00 | same |
11 | 10/29/2020 11:00 | same |
12 | 10/29/2020 12:00 | same |
13 | 10/29/2020 13:00 | same |
14 | 10/30/2020 14:00 | same |
Looking forward to your answers, thank you.
| makeresults | eval duration_hour=7 | eval other="dummy"
| eval times=mvrange(_time, _time+(duration_hour * 60 * 60), "1h")
| mvexpand times
| eval _time=times
| makeresults | eval duration_hour=7 | eval other="dummy"
| eval times=mvrange(_time, _time+(duration_hour * 60 * 60), "1h")
| mvexpand times
| eval _time=times
It works, thank you very much.