Limit or validate parameter of type 'date'

Hello, Is there a way to limit value selection, or validate a parameter of type date?

I have added a parameter of type “Datetime”, and added the control for date selection. I want to limit how far user can go back to select the date to say last month or last 30 days only. Is this possible? Or is there a way to validate the parameter after user selects it so that I can limit how far user can select?

image

Thanks

1 Like

Hi @mehulz

Thanks for posting your question and welcome to the QuickSight Community.

It isn’t possible to place this limit on the parameter control, but I wonder if you could use calculated fields that check whether the parameter control date is within a range? I created a calculated field dateBoundaryCalc as follows

ifelse(dateDiff(timestamp,${pDate})>30,"Out of bounds","In bounds")

Building a simple table visual results in this

This would allow your calculations to take different actions depending on whether the date selected in the parameter control is within a specific range of your dataset data, or not.

Many Thanks,
Andrew

Thank you Andrew. I will try this out, and let you know.
Mehul

1 Like

Hi Andrew, Thank you for your suggestion. I was able to do following:

  1. Created a calculated field for difference between start date and end date
  2. Added a new filter to show results only if calculated field < 30

Thanks once again.
Mehul

1 Like