Dashboards & Visualizations

Dashboard with different time tokens (today and -7days)

auaave
Communicator

Hi guys,

I have a daily report dashboard with the below token. However, I need to create another report on the same dashboard with trend for the last - 7 days.

How do I create a new token for the last 7 days?

If "today" is selected on the time picker, It should search for - 7 days from today?
If "yesterday" is selected on the time picker, It should search for - 7 days from yesterday?

<input type="time" token="time" searchWhenChanged="true">
      <label>Time</label>
      <default>
        <earliest>@d</earliest>
        <latest>now</latest>
      </default>
      <change>
        <eval token="time.earliest_epoch">if('earliest'="",0,if(isnum('earliest'),'earliest',relative_time(now(),'earliest')))</eval>
        <eval token="time.latest_epoch">if(isnum('latest'),'latest',relative_time(now(),'latest'))</eval>
        </change>
    </input>

Thank you!

0 Karma
Get Updates on the Splunk Community!

Congratulations to the 2025-2026 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

[Puzzles] Solve, Learn, Repeat: Nested loops in Event Conversion

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

Your Guide to Splunk Digital Experience Monitoring

A flawless digital experience isn't just an advantage, it's key to customer loyalty and business success. But ...