New feature - Date control with select options

Hi team,

Could you please consider working on the new feature that will give user more options to filter the calendar controls.
For better user expierence it will be great if he can straighforward select predefined options like:

Last Week

Last Month

Last Quarter

Last Year

and so on.

Hi @emil.zywina ,

This is a pretty common ask. Quick Sight does not have a native “quick pick” dropdown on its date control today, but you can get this exact behavior with a string parameter workaround.

Create a string parameter (say, pDateRange) and set its allowed values to things like “Last Week”, “Last Month”, “Last Quarter”, “Last Year”. Attach a dropdown control to it. Then create a calculated field that translates the selection into an actual date filter, something like:

ifelse(
${pDateRange} = ‘Last Week’ AND {your_date} >= addDateTime(-1, ‘WK’, truncDate(‘WK’, now())) AND {your_date} < truncDate(‘WK’, now()), 1,
${pDateRange} = ‘Last Month’ AND {your_date} >= truncDate(‘MM’, addDateTime(-1, ‘MM’, now())) AND {your_date} < truncDate(‘MM’, now()), 1,
${pDateRange} = ‘Last Quarter’ AND {your_date} >= truncDate(‘QQ’, addDateTime(-1, ‘QQ’, now())) AND {your_date} < truncDate(‘QQ’, now()), 1,
${pDateRange} = ‘Last Year’ AND {your_date} >= truncDate(‘YYYY’, addDateTime(-1, ‘YYYY’, now())) AND {your_date} < truncDate(‘YYYY’, now()), 1,
0
)

Then add a filter on that calculated field equal to 1. Your readers will see a clean dropdown with human-readable labels, and the dates resolve dynamically. You can add as many options as you want (YTD, MTD, Last 7 Days, etc.) by extending the ifelse.

That said, I do agree that a native built-in option for this would be much smoother. If you would like, after testing this workaround, I can still mark this post as a ‘feature-request’ which can help increase visibility to the Quick Team.

Hope this helps!

Hi Jacob,

I’m aware of this kind of workaround but this will create too much additional controls in my specific case, that’s why it would be great if you can consider this options as a feature request.

Hi @emil.zywina ,

Totally understandable. I have gone ahead and attached the ‘feature-request’ tag to this post. As I previously stated, marking this post with a ‘feature-request’ will help increase visibility to the Quick Team on how to keep improving Amazon Quick.

Thank you!