I have the following working Query for a single product AHSDFKSD1
ns=a* DECISION IN (ELIGIBLE, INELIGIBLE)
PRODUCT IN (AHSDFKSD1)
| timechart span=24h limit=0 count by DECISION
| eval total= ELIGIBLE+INELIGIBLE
| eval ELIGIBLE=round(ELIGIBLE/total,4)*100
| eval INELIGIBLE=round(INELIGIBLE/total,4)*100
| fields - total
Output
_time ELIGIBLE INELIGIBLE
2020-05-25 17:00 87.93 12.07
How can I modifying this query to output data per product? (Or even a totally different query if output is as follows)
Example I could have over 20 products AHSDFKSD1, GFAGDAYD2, GSDAUFCBE3, IGAGSDASHD4, GASDAHJDSGDA5 ........
I am looking for following output:
PRODUCT _time ELIGIBLE INELIGIBLE
AHSDFKSD1 2020-05-25 17:00 87.93 12.07
GFAGDAYD2 2020-05-25 17:00 80.03 19.97
GSDAUFCBE3 2020-05-25 17:00 87.90 12.10
IGAGSDASHD4 2020-05-25 17:00 92.93 7.07
How can I achieve this? Please assist. Thanks.
... View more