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
.conf21 Now Fully Virtual!
Register for FREE Today!

We've made .conf21 totally virtual and totally FREE! Our completely online experience will run from 10/19 through 10/20 with some additional events, too!