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!

Detecting Remote Code Executions With the Splunk Threat Research Team

REGISTER NOWRemote code execution (RCE) vulnerabilities pose a significant risk to organizations. If ...

Observability | Use Synthetic Monitoring for Website Metadata Verification

If you are on Splunk Observability Cloud, you may already have Synthetic Monitoringin your observability ...

More Ways To Control Your Costs With Archived Metrics | Register for Tech Talk

Tuesday, May 14, 2024  |  11AM PT / 2PM ET Register to Attend Join us for this Tech Talk and learn how to ...