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
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

[Puzzles] Solve, Learn, Repeat: Character substitutions with Regular Expressions

This challenge was first posted on Slack #puzzles channelFor BORE at .conf23, we had a puzzle question which ...

Splunk Community Badges!

  Hey everyone! Ready to earn some serious bragging rights in the community? Along with our existing badges ...

[Puzzles] Solve, Learn, Repeat: Matching cron expressions

This puzzle (first published here) is based on matching timestamps to cron expressions.All the timestamps ...