Dashboards & Visualizations

Compare two time ranges with pivot or tstats

Simon
Contributor

Hi all,

how can I compare two timeranges using the commands pivot or stats?

Example:
I wanted to compare last week to the last week a year ago without searching the data between those two ranges, e.g.:

| pivot Mymodel Myobject count(Netatmo_Events) AS anz, avg(temperature) AS temp | eval marker="yesterday" | append [| pivot Mymodel Myobject count(Netatmo_Events) AS anz, avg(temperature) AS temp | eval marker="weekago" ]

Thanks,
Simon

thomrs
Communicator

I use the timewrap app for this, compares ranges via time chart. The stats are also available for viewing.

https://apps.splunk.com/app/1645/

jayannah
Builder

Did you get the solution using pivot? We can't specify time range in pivot command..

0 Karma
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...