Hello! Is there somebody who can help me with the following problem? I want to make default parameter values depend on other parameters in the following way:
- Control 1 with parameter $reportType: Past dates, Future dates (dropdown)
- Control 2 with parameter $startDate (date picker)
- Control 3 with parameter $endDate (date picker)
Let’s assume today is 2024-04-24. Is it possible to set the default for $startDate to 2024-04-05 if “Future dates” is selected and to 2024-01-01 if “Past dates” is selected? etc.
Or is there a way to solve the issue without parameters?
Regards,
Bernhard
Hey @bernhard.boehm maybe is worth exploring the Dynamic default section in the Edit Parameter menu. Or if this is custom SQL you could work with ad hoc parameter in a case statement when querying the date range based on the report type? cheers Francesco
Well, with my knowledge of Quicksight I don’t see a way:
- The dynamic default can only depend on the user. But the same user may want to see Past Dates or Future Dates.
- Yes, I could query a limited period depending on the parameter, but I don’t know how to set a date selector based on the dates available in the dataset = min(date) to max(date). Is there a way to do this?
hey @bernhard.boehm if it is custom SQL you have flexibility but would need to have some more info on the data structure
Thanks for offering your support on this. For the sake of simplicity, let’s assume my current custom SQL looks like this:
SELECT
hotel_id,
arrival_date,
bookings,
revenue
FROM
bookings
Again, my goal is to have a different default dates in the date selector depending on whether the user chooses $reportType “Past dates” or “Future dates”.
Regards,
Bernhard
Hi @bernhard.boehm – also try using Creating cascading filters - click here