Dashboards & Visualizations

Dynamic and Bounded Form Time Picking

davidpaper
Contributor

I'm working with a customer who is trying to do something a little uncommon.

1) I’d like to create a form where
2) The user picks a single date

I then use that date to calculate a relative time period to run a multi-period set of statistics. In my case it’s a three (3) week period where I calculate separate stats for each of those three (3) weeks.

When selecting the date the user has two (2) options - the selected date will either:
· Be an absolute “anchor” date from which I choose the next 21 days (the selected day of week is used as the weekly terminator)
· Indicate which week to use, but I then find the closest previous Sunday as my starting point

Example: User chooses July 11th (A Monday)
· Option #1: query time period will be from July 11th – August 1st (3 weeks, each week starts on a Monday)
· Option #2: query time period will be from July 10th – July 31st (3 weeks, each week starts on a Sunday)

The whole key, though, is coming up with a way for the user to choose a single date and then time boxing my query using a time period calculated relative to that date.

Suggestions for how to approach this are welcome.

0 Karma

woodcock
Esteemed Legend

I would have a date picker and a pair of radio buttons corresponding to the 2 mutually-exclusive ways to use that date.
Depending on the selections you do what you need to do.

The simple way is to have 1 search/panel written for each case and have each one use the <depends> directive tied to one or the other radio button selections.

0 Karma
Get Updates on the Splunk Community!

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...