Dashboards & Visualizations

mutliple moving averages for a time chart.

learningsplunk
Path Finder

Hello Splunk community, 

For this dataset : 

TimeAgentNumber of calls taken
11:00 AMJohn1
11:00 AMKate0
11:00 AMEric1
10:00 AMJohn2
10:00 AMKate1
10:00 AMEric0
9:00 AMJohn0
9:00 AMKate1
9:00 AMEric1
8:00 AMJohn3
8:00 AMKate1
8:00 AMEric2
7:00 AMJohn3
7:00 AMKate5
7:00 AMEric2
6:00 AMJohn2
6:00 AMKate3
6:00 AMEric0


Is it possible to get a moving average for each agent along with the moving average for the total amount of calls in one specific hour  and to place this all into a time chart? 

this is the Splunk query I'm currently using :

| union [| search  <insert index here>  AGENT=* | bin _time span=1h | stats count BY _time | trendline wma2(count) AS AverageNumberoftotalcallsperhour |table _time AverageNumberoftotalcallsperhour ]
[| search <insert index here> Agent=Kate| bin _time span=1h | stats count BY _time | trendline wma2count) AS AvgKate |table _time AvgKate ]
[| search<insert index here>  Agent=John| bin _time span=1h | stats count BY _time | trendline wma2(count) AS AverageNumberOfCallsPerHourbyJohn |table _time AverageNumberOfCallsPerHourbyJohn  ]
[| search<insert index here> Agent=Eric| bin _time span=1h | stats count BY _time | trendline wma2(count) AS AvgEric |table _time AvgEric ]



However, when trying to run the splunk query,  the output isn't correct : 

_timeAverageNumberoftotalcallsperhourAvgKateAverageNumberOfCallsPerHourbyJohnAvgEric  
6:00 AM2     
7:00 PM2     
8:00 AM 3    
9:00 AM 3    
10:00 AM  4   
11:00 AM  4   

Noon

   5  

               

Labels (1)
Tags (2)
0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Can’t Make It to Boston? Stream .conf25 and Learn with Haya Husain

Boston may be buzzing this September with Splunk University and .conf25, but you don’t have to pack a bag to ...

Splunk Lantern’s Guide to The Most Popular .conf25 Sessions

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...

Unlock What’s Next: The Splunk Cloud Platform at .conf25

In just a few days, Boston will be buzzing as the Splunk team and thousands of community members come together ...