Forum Discussion
Rajesh1
Helper I
7 years agoMax and Min date/times based on condition
hello all, I have the following table: v.ID. Loc Date Status V1 P 01-Feb-2019 13:00:00 Slow V1 P 01-Feb-2019 12:30:00 Slow V1 P 01-Feb-2019 12:15:00 Slow V1 P 31-...
v-juanli-msft
Community Support
7 years agoHi Rajesh1
Is there a column to define differnt vehicle running record as below?
| v.ID. | Loc | Date | Status | column |
| V1 | P | 2/1/2019 13:00 | Slow | 1 |
| V1 | P | 2/1/2019 12:30 | Slow | 1 |
| V1 | P | 2/1/2019 12:15 | Slow | 1 |
| V1 | P | 1/31/2019 23:00 | Slow | 1 |
| V1 | R | 1/31/2019 20:30 | Slow | 2 |
| V1 | R | 1/31/2019 18:00 | Slow | 2 |
| V1 | R | 1/30/2019 16:00 | Slow | 2 |
| V1 | R | 1/30/2019 14:00 | Slow | 2 |
| V1 | R | 1/30/2019 12:00 | Slow | 2 |
| V1 | R | 1/30/2019 11:00 | Normal | 3 |
| V1 | R | 1/30/2019 10:00 | Normal | 3 |
| V1 | R | 1/30/2019 9:00 | Normal | 3 |
| V1 | R | 1/30/2019 7:00 | Normal | 3 |
| V1 | R | 1/30/2019 6:30 | Slow | 4 |
| V1 | R | 1/30/2019 1:00 | Slow | 4 |
| V1 | R | 1/29/2019 23:00 | Slow | 4 |
| V1 | R | 1/29/2019 18:00 | Slow | 4 |
| V1 | R | 1/29/2019 15:00 | Slow | 4 |
From your screenshot and provided information, it is hard to differ the row 1 and row4.
| v. ID. | Loc | Status | From Date | To date | Days | |
| V1 | P | Slow | ######## | ######## | 0.583333 | 1 |
| V1 | R | Slow | ######## | ######## | 1.354167 | 2 |
| V1 | R | Normal | ######## | ######## | 0.166667 | 3 |
| V1 | R | Slow | ######## | ######## | 0.645833 | 4 |
Best Regards
Maggie
Rajesh1
Helper I
7 years agohi v-juanli-msft ,
Thanks for your reply.
I have been unable to work out a way to create such a column.
Tried Current_Column_Value = EARLIER(Column Value) in a calculate + filter. I am yet to find a way to get this 'key' column created. If I am able to create this column, I can then do a summarizecolumn and get the job done.
This is where I am stuck at.
Looking forward to some ideas to achieve this.
Thanks again,
Rajesh