Dashboards & Visualizations

How to create dashboard with trend line to show percentage this month v last month

timrich66
Communicator

Hi,

I have a dashboard that works out the percentage of builds that complete inside SLO.   I would like to be able to compare this month's results to those of last month and show a trend line as to how much this percentage has improved (or not).  I appreciate that 'count' and timechart are normally used to show the trendline on a single value visualisation.  Is there a solution that allows a trendline from a single value that is achieved via eval?

Many thanks

Labels (1)
0 Karma

weidertc
Contributor

For simple counts, you can get both timelines like this

| multisearch
[index="asfd" ... earliest=@mon latest=@d
| eval Month=0]
[index="asfd" ... earliest=@mon-1mon latest=@mon
| eval Month=1]
...
| timechart count(eval(Month=0)) as "ThisMonth", count(eval(Month=1)) as "LastMonth"

As far as percentages, it depends on how you want it, like per interval, up to the latest interval, or as a whole.  There are very different solutions for each.

0 Karma
Get Updates on the Splunk Community!

Index This | Why did the turkey cross the road?

November 2025 Edition  Hayyy Splunk Education Enthusiasts and the Eternally Curious!   We’re back with this ...

Enter the Agentic Era with Splunk AI Assistant for SPL 1.4

  🚀 Your data just got a serious AI upgrade — are you ready? Say hello to the Agentic Era with the ...

Feel the Splunk Love: Real Stories from Real Customers

Hello Splunk Community,    What’s the best part of hearing how our customers use Splunk? Easy: the positive ...