Dynamic Start and End Date based on selections

Hi Everyone,

I have below date field and customer field. every customer has certain dates.

for example: Customer 1 has below data

and customer 2 has below data

and so on.,

I have to show start date and end date filter

if the user clicks on customer 1 then
start date of this should be 19-01-2022 and end date should be 17-02-2025

if the user clicks on customer 2 then
start date of this should be 03-03-2022 and end date should be 10-03-2025

so start date and end date should be dynamic. How this can be resolved?

can someone help to fix this?

Thanks,
Satya

Hi @SatyaPaleti,
There’s no great out of the box way to setup dynamic date parameters as you’re limited to date picker options for those.
The best work around for an option like this would be to change your date fields to strings and then set them up to be cascading filters based on a customer parameter.

I’ll go ahead and mark this as a feature request also as dynamic filters that can function in this way would be a helpful addition.

Thank you

1 Like

Hi @SatyaPaleti , did you consider using a regular table with Customers and Start/End dates? it could be a new table with these 3 columns or you could add Start/End dates (you can calculate them using window functions) as hidden columns to the existing table. Then you can use Interactions (Action type = Navigation action) to set values for 2 parameters (StartDate and EndDate) and use these parameters in filters. You still will be able to use date pickers to change these values manually.

A basic version:

  1. create 2 Datetime parameters (fromDate and toDate)
  2. create a table with 3 columns: CustomerID, MinCreationDate=min(CreationDate), MaxCreationDate=max(CreationDate).
  3. go to Properties → Interaction → [Add Action]
  4. set Action Type = Navigation Action and 2 pairs of Parameber/Column using “+” button (fromDate = MinCreationDate, toDate = MaxCreationDate ). Pay attention to data types, they should match. I don’t know if you need to save CustomerID in a parameter, but you can do it in the same way.
  5. click Save
  6. use the parameters in filters

When you click on a row QuickSight will put the values from this row into the parameters that are added to the Navigation Action. You can add these parameter to the title/subtitle to see how they are changed. So every click changes values in these parameters.

A filter visual allow to change a single filter. A Navigation Action allows to set values for many parameters, it’s a good solution when you need to set several values by a single click.

1 Like

Hi @SatyaPaleti,
It’s been awhile since we last heard from you on this thread, did you have any additional questions pertaining to your original topic?

If we do not hear back within the next 3 business days, I’ll close out this topic.

Thank you!