Hi all,
I'm trying to create a visualisation to show the percentage of ticket status (New, Comleted, Cancelled, etc.).
I tried with this search :
| stats latest(_time) as Time by "Record Number", PI_Number, PI_Event_Status
I have ticket with Record Number (id), Number (Version), Status. I want to take the last ticket event of the version and get his status. In order to count the current status of each event on the system.
The result is the following :
Record Number | Number | Status | _time |
11867114 | 1 | Completed - Owner Action Required | 1472175180 |
11867114 | 1 | New | 1471951740 |
12297522 | 1 | Completed - Nothing Found | 1477321800 |
12297522 | 1 | Investigating | 1475829120 |
12297522 | 1 | New | 1475735400 |
12297522 | 2 | Completed - Error/Workaround Found | 1479229260 |
12297522 | 2 | New | 1479198300 |
12297522 | 3 | Completed - Recovery PTR Open | 1482241320 |
12297522 | 3 | New | 1482226920 |
With my stats command i'm not able to retrieve only last event for each version of a ticket. How i can do that ?
Regards,
Clément
| stats latest(_time) as Time, latest(PI_Event_Status) as PI_Event_Status by "Record Number", PI_Number