Splunk Enterprise

Dashboard Studio Single Value with Trendlines

chrisboy68
Contributor

Hi, struggling to get single values to show with trendline comparing to previous month.

 

| bin span=1mon _time
| chart sum(cost) as monthly_costs over bill_date 

 

Tried differnt varations. The above will show a single value for each month, but I want to add a trendline to the single value to compare to the previous month. Any ideas?

Thanks!

Labels (1)
0 Karma

chrisboy68
Contributor

Hi, this https://docs.splunk.com/Documentation/Splunk/9.4.0/DashStudio/trellisLayout.  Specifly like this sample.  With each month, cost and the trend line comparing to previous month.

chrisboy68_0-1738005216924.png

 

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

So far, you have only mentioned 2 dimensions, cost and time - what else are you breaking your statistics down by?

0 Karma

chrisboy68
Contributor

This is probably why I'm getting confused.

Jan100
Feb105
March90

 

Given this table, I want to have a single value trellis view that depicts the month total , with a trend compared to the previous month.

Jan 100 (no trend) , Feb 105 (shows trend up 5), March 90 (shows trend down 15).

I'm going to play with timewrap, maybe I'm going down the wrong path.

0 Karma

MMahlberg
Explorer

I was struggling with the same task and went down the rabbit hole trying out every known command. The example in the dashboard studio is unfortunately not correct.

Timewrap looks like it could work, but splunk somehow gets confused with it in the foreach command.

This is what i came up with:

```   aggregation over month ```
| eval month = strftime(_time, "%Y-%m") 
| stats   count by month

```   transposing to to get it into right format and adding totals below```
| transpose 0 header_field=month
| addcoltotals

```   shifting everything one column to the right if the "column" field is not emty ```
| eval p = "" 
| foreach 20* [ 
    eval v = '<<FIELD>>', 
         <<FIELD>> = if(isnotnull(column), p, '<<FIELD>>'), 
         p = if(isnotnull(column), v, p) 
    ] 
| fields - p v

```   splunk NEEDS a _time field for Trellis to work. No idea why ```
| eval _time = now()
| table _time 20*

 

MMahlberg_0-1770890464882.png

 

make sure to disable the sparkline and change the trend to percentage. 

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust
| bin span=1mon _time
| chart sum(cost) as monthly_cost over _time
0 Karma

chrisboy68
Contributor

Keep getting "Select a valid trellis split by field", used "_time" and tried "monthly_cost" . 

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

"Trellis"? Where did that come from? Please clarify what you are actually trying to do?

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!

Index This | What travels the world but is also stuck in place?

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

Discover New Use Cases: Unlock Greater Value from Your Existing Splunk Data

Realizing the full potential of your Splunk investment requires more than just understanding current usage; it ...

Continue Your Journey: Join Session 2 of the Data Management and Federation Bootcamp ...

As data volumes continue to grow and environments become more distributed, managing and optimizing data ...