Hello
I'm trying to add a percentage for each day. Here is what I have:
index=tt OrderIntegration.asmx "PlaceOrderResponse" ("RealTime" OR "AdvancedSale") | timechart span=1d count(eval(searchmatch("RealTime"))) as NumberofRealTimeListings, count(eval(searchmatch("AdvancedSale"))) as NumberofNonRealTimeListings, sum(eval("NumberofNonRealTimeListings"/"NumberofRealTimeListings")) as Percent
Any ideas what I'm missing?
Hello
Have you tried to eval the percentage after the timechart, like:
index=tt OrderIntegration.asmx "PlaceOrderResponse" ("RealTime" OR "AdvancedSale") | timechart span=1d count(eval(searchmatch("RealTime"))) as NumberofRealTimeListings, count(eval(searchmatch("AdvancedSale"))) as NumberofNonRealTimeListings | eval Percent = (NumberofNonRealTimeListings/NumberofRealTimeListings)*100
Regards
Hello
Have you tried to eval the percentage after the timechart, like:
index=tt OrderIntegration.asmx "PlaceOrderResponse" ("RealTime" OR "AdvancedSale") | timechart span=1d count(eval(searchmatch("RealTime"))) as NumberofRealTimeListings, count(eval(searchmatch("AdvancedSale"))) as NumberofNonRealTimeListings | eval Percent = (NumberofNonRealTimeListings/NumberofRealTimeListings)*100
Regards
How can I use this percentage and plot it in a timechart ? Can someone help.
I actually got that after I added that comment. Thanks for the direction!
Yes when I did this I got "Error in 'eval' command: Typechecking failed. '/' only takes numbers."
You are right! edited the answer
also, I think you should remove the double quotes around the field names in the eval.