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!

Observe and Secure All Apps with Splunk

  Join Us for Our Next Tech Talk: Observe and Secure All Apps with SplunkAs organizations continue to innovate ...

Splunk Decoded: Business Transactions vs Business IQ

It’s the morning of Black Friday, and your e-commerce site is handling 10x normal traffic. Orders are flowing, ...

Fastest way to demo Observability

I’ve been having a lot of fun learning about Kubernetes and Observability. I set myself an interesting ...