I have a dashboard with 3 elements using the time input at the top to drive the search results. One of the three elements is a line graph. I want this line graph to filter based on the time range selected from the top UNLESS it's less than 7 days long.
For example, if they choose last 24 hours, I want the line graph to show the last 7 days. If they choose a date range 7 days or more (like 1/1/2019 through 1/17/2019) then I want it to use this selection.
Essentially, I need the graph to function like such:
IF (($time.latest$ - $time.earliest$) >= 604800, (earliest=$time.earliest$ AND latest=$time.latest$), (earliest=($time.latest$ - 604800) AND latest=$time.latest$))
604800 is the number of seconds in a week.
Thanks!
... View more