Splunk Search

What is the best way to generate a timechart count and overlay a trendline of expected goal growth?

ahofmann
Explorer

Hi, I want to generate a timechart count of actual values and overlay a trendline of expected goal growth. Basically I want to trend how my data is growing over time with a visual of how I hoped it grew over time.

index=myDownloads
| timechart span=1w count as Downloads

Above, is an example of the base query, and I tried appending static data using a lookup table with prepopulated weekly download numbers to no avail. Before I go too far down this road, is there a way easier way I can plot a simple slope of static values growing 1% each week?

Thank you!

0 Karma

ahofmann
Explorer

I was able to brute-force an inelegant solution to this.
I created a csv of what static values that I wanted the growth to resemble. I added it as a lookup 'staticgrowth.csv'

index=myDownloads
 | timechart span=1w count as ActualDownloads
| appendcols 
[| inputlookup staticgrowth.csv
| eval _time=strptime(date,"%Y-%m-%d")
| eval weekBeginning=relative_time(now(), "-0w@w")
| where _time<weekBeginning
| timechart span=1week values(staticDownloadCount) as GoalDownloads]
0 Karma
Get Updates on the Splunk Community!

What's new in Splunk Cloud Platform 9.1.2312?

Hi Splunky people! We are excited to share the newest updates in Splunk Cloud Platform 9.1.2312! Analysts can ...

What’s New in Splunk Security Essentials 3.8.0?

Splunk Security Essentials (SSE) is an app that can amplify the power of your existing Splunk Cloud Platform, ...

Let’s Get You Certified – Vegas-Style at .conf24

Are you ready to level up your Splunk game? Then, let’s get you certified live at .conf24 – our annual user ...