Splunk Search

How to create a single value element for the dashboard?

leanpro
Engager

I have following stats. I want to create a single value element which will show the revenue of 2014 and increase/decrease from last year.alt text

0 Karma
1 Solution

somesoni2
Revered Legend

Try this

index="sales_data" sourcetype=csv | stats sum(Revenue) as Total_Revenue by Year 
| eval _time=strptime(Year."-01-01","%Y-%m-%d")
| timechart span=1y sum(Total_Revenue) as Total_Revenue

select single value visualization in Visualization tab. If all looks good, Save As dashboard panel.

View solution in original post

0 Karma

somesoni2
Revered Legend

Try this

index="sales_data" sourcetype=csv | stats sum(Revenue) as Total_Revenue by Year 
| eval _time=strptime(Year."-01-01","%Y-%m-%d")
| timechart span=1y sum(Total_Revenue) as Total_Revenue

select single value visualization in Visualization tab. If all looks good, Save As dashboard panel.

0 Karma

leanpro
Engager

Super appreciated, many thanks buddy!

0 Karma
Get Updates on the Splunk Community!

Aligning Observability Costs with Business Value: Practical Strategies

 Join us for an engaging Tech Talk on Aligning Observability Costs with Business Value: Practical ...

Mastering Data Pipelines: Unlocking Value with Splunk

 In today's AI-driven world, organizations must balance the challenges of managing the explosion of data with ...

Splunk Up Your Game: Why It's Time to Embrace Python 3.9+ and OpenSSL 3.0

Did you know that for Splunk Enterprise 9.4, Python 3.9 is the default interpreter? This shift is not just a ...