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!

Accelerating Observability as Code with the Splunk AI Assistant

We’ve seen in previous posts what Observability as Code (OaC) is and how it’s now essential for managing ...

Integrating Splunk Search API and Quarto to Create Reproducible Investigation ...

 Splunk is More Than Just the Web Console For Digital Forensics and Incident Response (DFIR) practitioners, ...

Congratulations to the 2025-2026 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...