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!