Hello,
I have a Dataset with 12 snapshot dates, each equal to the end of a month (e.g. Sep24 = 2024-09-30). I want a filter to select the snapshot date that:
Shows only available Snapshots (not a date picker, more like a list of the 12 dates)
Hi @Francesca and welcome back to the QuickSight community!
Could you share a snapshot of what your date fields look like…are they in your dataset has ‘Sep24’ or as individual dates like ‘2024-09-30’?
Additionally, do you need to account for multiple dates in a month if they are setup as individual dates?
Yes, this seems feasible and here’s how you should be able to accomplish this:
Create a calculated field to extract month&year for every date. Ex: Calculated field ‘String_date’ would return - Jan24 for 1/31/2024, Feb24 for 2/29/2024 and so on.
Create a parameter-filter-control on this calculated field. The filter will only display the list of String_date’s as a ‘Dropdown’ with a default set to last month.
Filter action/control will apply corresponding action on the visuals based on the value selected in the filter dropdown.
Ex: If user selects Mar24, then ‘3/31/2024’ filter action should be applied on the date field of the visuals.
Create (in dataset prep, not within analysis) a calculated field that returns for each date a STRING (e.g. “2024-1”).
Create a parameter based on calculated field in (1): to do so I have to create a parameter with Data Type = string, and it cannot accept as default value a relative date.
Add a control based on parameter in (2): now I can link the calculated field in (1) to the parameter, but again since the field is a string, I cannot set any default as relative date.
I have 1 column called “snapshot_date” that contains end of month dates in the format YYYY-MM-dd (e.g. 2024-09-30). For each month, there is only 1 date.
You are right! Unfortunately, there doesn’t seem to be a supporting feature for this option. You would either have to manually set the ‘static default value’ of the String date to previous month or create a new parameter with the ‘DateTime’ data type which will allow you to create a dynamic default as shown below:
Only catch here is -
although you can format the associated Filter/Control to appear as a STRING date, it will be a calendar instead of a simple dropdown list.
Hi @Francesca,
It’s been awhile since we last heard from you, did you have any additional questions regarding your initial post?
If we do not hear back within the next 3 business days, I’ll go ahead and close out this topic.