How to sort in descending order?
Also, to restrict to 5 values in the drop-down list. Something like applying filter on filter control (e.g. showing 1999 to 1995 in this case)
Thanks!
Hi @lbl,
Controls by default will sort your values in alphabetical (or numerical) order and unfortunately, thereâs no function to change that.
In regards to limiting your results, since there are no options to filter your controls in that way, you would need to manually input the values that youâd like to return as options. Which you can do by clicking on the 3 dots next to your control to bring up the format visual panel (see below). Make sure to only add one value per line and no commas.
hi,
The filtering should be dynamic and not hard-coded or static.
e.g. filter of Country is depending on filter of Region, filter of Year is the recent 5 years
Can the above be achieved?
Thanks.
Hi @lbl ,
The filter controls in analysis will show the options available in the dataset by default. Exception is when there is a âShow relevant values onlyâ relation with another filter control in play.
Ideally, you would want to see all the years, for which you have data, in the control drop down.
Since you say that you want to see only 5 years in the drop down, does it also mean that you only want 5 years of data in your visuals? If so, you can create a dateDiff calc in your dataset comparing your main date field with now() to get the difference in years and have a dataset filter that pulls in records with values less than or equal to 5.
On other hand, if you want to bring in more data but just want to show 5 years in the filter control drop down (for some custom use case of yours), create the dateDiff field in dataset, add a filter on that field in the analysis, set that filter to pull in values 0-4, add a control for that filter, set the âshow relevant values onlyâ option on your year filter control to be dependent on the above created control and then set the dateDiff fieldâs control to be hidden by default (in free-form layout).
Regards,
Arun Santhosh
Pr QuickSight SA