I have a table with a dropdown multiselect filter control for a numeric value. This control should hold all the numeric values of that field, but I want the default selection to be the maximum number from that field. How do I do this?
Field: Year
Example values: 2026, 2025, 2024, 2023, etc.
I want it to default to 2026, and the user can select others. When its 2027, i want it to default to 2027 and so forth.
Hope everything is well! With how the native behavior for date filtering works, it is currently not possible to set a year default on a filter control. Although not an ideal solution, I would just recommend to update the date filter as each year passes for your use case.
Thanks! The field means a year, but it is a numeric value, and quicksight treats it as a numeric field. It could be 1-1,000,000, money, percentage, anything numeric. The max number could change at any time when the dataset is updated.
I want for the filter to default to the highest number in that field. Is there a way to do this?
But yes, this is all a rough workaround for filtering dates. The user is filtering by month and year. I had to make a field for year and month from a date field. We can’t use the native date filter on this date field because
we want results for the whole month, and
all the dates are the first of the month, so if the user doesn’t click on the first from the date picker, there are no results. It would be great if we could set the date granularity in a filter the same way we can in the visual formatting. Natively, quicksight let’s us truncate a date value to second, minute, hour, day, week, month, quarter, year. It would be great if the filter could do that too.
Although not 100% sure, I feel that this workaround could potentially for your use case. If you need to filter out other fields based on a specific year and month, you can make a date placeholder calculated field like the one I did below:
From there, attach a filter for that date placeholder to your respective visuals. From there you can create a control for that filter (where you can also format the date to showcase ‘MM/YYYY’), which should allow you to filter month and year regardless of what day you pick in the date picker.
Feel free to let me know if this workaround was helpful for you. If not, I wonder if it is possible to achieve this via playing around with dynamic defaults. Other than that, as mentioned I do not think this behavior will be achievable based on your numeric field use case.
Just checking back in to see if you were able to view my most recent reply. Please help the community by marking this answer as “Solution” or following up in general within the next 3 business days!
Since I haven’t received any further updates from you, I’ll treat this inquiry as complete for now. If you have any additional questions, feel free to create a new post in the community and link this discussion for context.