Dashboards & Visualizations

How to show single value trend?

kiran331
Builder

Hi

How to show the single value trend, showing increase or decrease from last week? I have a data which will be daily i have to show increase OR decrease fr last 7 days, compared to previous 7 days.I'm using below, its not working. Any suggestions?

index=abc|timechart span=7d count

Tags (2)
0 Karma

puneethgowda
Communicator

Stats count by datemday

Select time range last 7 days from the time picker

0 Karma

DalJeanis
Legend

how about

index=abc|timechart span=1d count | delta count p=7 

modified to tell splunk WHAT to delta...(the count field)

kiran331
Builder

I tried its showing No results Found

0 Karma

aaraneta_splunk
Splunk Employee
Splunk Employee

@kiran331 - Were you able to test out DalJeanis' updated solution? Did it work? If yes, please don't forget to resolve this post by clicking on "Accept". If you still need more help, please provide a comment with some feedback. Thanks!

0 Karma

DalJeanis
Legend

My error. Try the new code above.

0 Karma

niketn
Legend

In line with DalJeanis' answer you can use accum to show cumulative upward trend for selected time frame

index=_internal sourcetype=splunkd log_level=ERROR
| timechart count 
| accum count as count

Since this is Cumulative or Running total it will always trend upwards. So you can decide color based on trending in scenarios where Running Total remains zero as either red or green and Running Total increasing as other color based on what you have chosen for zero increment.

Notice no span in timechart and I would also leave Single Value trend interval <option name="trendInterval">auto</option> to auto, to let Splunk decide the same based on selected timerange i.e. if Search runs for a day both of them will be hourly and if it runs for a week it will change to daily. You can change them as per your need if you have static time frame.

____________________________________________
| makeresults | eval message= "Happy Splunking!!!"
0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

SOC4Kafka - New Kafka Connector Powered by OpenTelemetry

The new SOC4Kafka connector, built on OpenTelemetry, enables the collection of Kafka messages and forwards ...

Event Series: Level up your SOC: Advancing with Splunk Enterprise Security

AI has fundamentally raised the stakes for security operations, and this three-part series is your guide to ...

Announcing Modern Navigation: A New Era of Splunk User Experience

We are excited to introduce the Modern Navigation feature in the Splunk Platform, available to both cloud and ...