I am looking for a way to create a relational parameter that updates the dropdown menu and possible choices based on another parameter already created. Parameter one holds values Monthly and Weekly for which a user can decide the granularity they want the data shown and want to create 2 additional parameters for start and end date with dropdown menus based on the fields of week_date and month_date based on if the user chooses monthly or weekly.
Hi @mroo11,
What type of fields or your âweek_dateâ and âmonth_dateâ fields?
âDateâ data type fields do not allow for dropdown controls so you would need to create an ifelse statement that categorizes date ranges in to your desired Month or week formats so that you could utilize a dropdown.
With that, you can create rules that hide/show parameter controls based on other parameters much like you can do to visuals.
While I donât have sample data that mimics your example, I put together an Arena view that breaks down a couple options you could explore for your scenario:
Creating a parameter dropdown control based on another parameter selection
Let me know if you have any additional questions.
Thanks @Brett for your help.
Currently my week_ending_date is a date format but also have a week_ending_date_string which is a string value. We are looking to utilize the drop down to eventually push into a date filter.
User would choose âMonthly or Weeklyâ from Parameter 1. Parameter 2 (Start Date) would update to show possible values from either week_end_date field or month_end_date field. The parameters would then be used to filter a visual or table based on these dates chosen.
Hi @mroo11,
For your case, I believe you would need to essentially create ifelse statements that categorize your date field into the dropdown options that youâd like since you are not able to setup a drop down date parameter. Then you can use my strategy above to switch back and forth between the possible parameters.
Thanks @Brett
We have tried to implement this approach but have not have any luck. It appears we are getting SQL errors when generating the control and trying to separate the data based on Parameter 1 âMonthly or Weeklyâ. Do you have any other suggestions? Would sharing how the data is set up help?
Hi @mroo11,
If thereâs any way that you can anonymize your data and upload a copy of your analysis to the QuickSight Arena viewâŚyouâll be able to set it to share, that may be the easiest way to assist further.
As mentioned above though, QS does not make it easy to operate date parameters with a drop down but weâll see what we can come up with.
I appreciate all the help @Brett
Here is the data in Arena, hopefully I did this correctly. First time uploading into it.
Hi @mroo11,
Thanks for sharing on Arena! So the biggest hurdle youâll encounter with setting up drown down parameters will be that you can not setup parameters from calculated fields. For the âweek date formattedâ and âmonth date formattedâ calculated fields, if you create them in the dataset instead of the analysis, you should be able to setup parameters for them but take a look at the work around I put together in the Arena view as well.
Essentially, youâll create two of everything and trigger them to be hidden/show based on your week/month parameter.
Instead of using parameter controls for the date fields, I just created a filter for each visual, then added a control for that filter.
Let me know if this can be a viable work around for your case or if you have any additional questions!
@mroo11, Apologies I forgot the link to the Arena view:
Creating a parameter dropdown control based on another parameter selection
Hi @mroo11,
Following up here as itâs been awhile since we last heard from you; did the solution provided above work for your case or did you have any additional questions?
If we do not hear back within the next 3 business days, Iâll close out this topic.
Thank you!
Hi @mroo11,
Since we have not heard back, Iâll go ahead and close out this topic. However, if you have any additional questions, feel free to create a new post in the community.
Thank you!