Dashboards & Visualizations

Finding Average based on last 5 days transaction?

ubp1252
Explorer

Hi,

We have data which will display total tarnsactions and success transactions count based on our time range.But we got one requirement that when some incident happen that time the count we are getting very less compared to other days.So our target is whenever we got that type less transactions we need to average for last 3 days total transactions and display that number instead of less transaction count.Please help how to solve this.

Sample Data:

DateTotal_tranasactionsSuccess_tranasactions
01-04-2021   8070
02-04-2021   7570
03-04-2021   10090
04-04-2021   102

 

Expected Output:

DateTotal_tranasactionsSuccess_tranasactions
01-04-2021   8070
02-04-2021   7570
03-04-2021   10090
04-04-2021  avg of last 3 days2
Labels (1)
0 Karma

ITWhisperer
SplunkTrust
SplunkTrust
| streamstats window=3 sum(Total_tranasactions) as rolling3total count as days by Date
| eval average3days=rolling3total / days
| eval Total_tranasactions=if(Total_tranasactions < 20, average3days, Total_tranasactions)
0 Karma
Get Updates on the Splunk Community!

Splunk Decoded: Service Maps vs Service Analyzer Tree View vs Flow Maps

It’s Monday morning, and your phone is buzzing with alert escalations – your customer-facing portal is running ...

What’s New in Splunk Observability – September 2025

What's NewWe are excited to announce the latest enhancements to Splunk Observability, designed to help ITOps ...

Fun with Regular Expression - multiples of nine

Fun with Regular Expression - multiples of nineThis challenge was first posted on Slack #regex channel ...