Quantcast
Channel: Questions in topic: "splunk-enterprise"
Viewing all articles
Browse latest Browse all 47296

How to use the stored results in variables after stats command using by clause in calculation ?

$
0
0
Hi, I'm using the below query in order retrieve average and standard deviation for the respective days (mon,tue,wed, etc. ) for each warehouse for the last 90 days and i want to use the output values in other calculation in order to retrieve the limits. Could you please help how i can achieve this ? How are the values retrieved from stats command by clause are stored internally and how i can assign them to new variable matrix etc ? Search Query: index="orderstowh" | where in (WH,1,2,3,4,5,6,7,8,9) | timechart span=1d count as "Total" by WH | untable _time WH Total | eval dayofweek=strftime(_time,"%w") | where dayofweek in (1,2,3,4,5) | stats avg(Total) as avg stdev(Total) as stdev by WH,dayofweek ........................... | eval lowerBound[WH,dayofweek]=(avg[WH,dayofweek]-(stdev[WH,dayofweek]) ) | eval upperBound[WH,dayofweek]=(avg[WH,dayofweek]+(stdev[WH,dayofweek]) ) Thanks in advance!!

Viewing all articles
Browse latest Browse all 47296

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>