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!

Splunk Observability for AI

Don’t miss out on an exciting Tech Talk on Splunk Observability for AI! Discover how Splunk’s agentic AI ...

[Puzzles] Solve, Learn, Repeat: Dereferencing XML to Fixed-length events

This challenge was first posted on Slack #puzzles channelFor a previous puzzle, I needed a set of fixed-length ...

Stay Connected: Your Guide to December Tech Talks, Office Hours, and Webinars!

What are Community Office Hours? Community Office Hours is an interactive 60-minute Zoom series where ...