How to set default value for month filter?

I have a field called monthFull in the datetime format. (Ex, 2023-10-01)

I would like to create a filter with a default value as the current month.

For the datetime format field, I have created a parameter called thisMonth which retrieves the relative date and returns the correct value.

However, the filter drop down is in this weird datetime format. Is there a way to have a list dropdown like in a string filter?


I have another field called month in the string format. (Ex, 2023-10-01)

The filter has the dropdown list that we want however I can’t seem to set a default value as the current month with a dynamic parameter.

Is there a way to link the datetime parameter and the string parameter?


Is there a easier way to do this? Any suggestions are welcome. Thanks!

Hi @Jacao and welcome to the QuickSight community!

When you are using a datetime parameter, you can also define the format to be used within the control using the “Format control” pane by selecting the “Edit” option on the control:

datepicker_date_format

As of now, controls linked to a datetime parameter can only be of type “Date picker”.

When leveraging String parameters, you can also define dynamic default values on a user or group level (see documentation). For that default value to always return the current month, you can add a calculated field in the dataset used to define the dynamic default values in the following way:

formatDate(truncDate('MM',now()),'yyyy-MM-dd')

However, if your use case involves embedding the dashboard into an application, the easiest way to achieve your desired behavior is to calculate and set the default value (current month) from within your application using the Amazon QuickSight Embedding SDK ( parameters within the contentOptions).

Did this answer your question? If so, please help the community out by marking this answer as “Solution!”. Thanks!