Hi Team,
I have two queries having different count and i want to calculate the percentage of success using the two queries.
query 1: | inputlookup ConsumerSORsDetail.csv |dedup "Process Name" |rename "Process Name" as SOR|stats count as total_sor
query 2: index=bp_ede_om_consumer |rex field=source "cnapp_src_(?P[^.]*)\/log" | rex field=source "(?\d{4}-\d\d-\d\d-\d\d-\d\d-\d\d)(?[0-9]+)" |stats count as actual_sor
the query has 10 results and the query has 7 results . i want to find the percentage. can you guys please help
hi @pench2k19
try like this ..
| inputlookup ConsumerSORsDetail.csv |dedup "Process Name" |rename "Process Name" as SOR|stats count as total_sor |appendcols [search index=bp_ede_om_consumer |rex field=source "cnapp_src_(?P[^.]*)\/log" | rex field=source "(?\d{4}-\d\d-\d\d-\d\d-\d\d-\d\d)(?[0-9]+)" |stats count as actual_sor] |eval percentage=(actual_sor/total_sor)*100