Hi,
I don't often use Visual Analytics so I am sure this is a simple question for someone.
I'm filtering various list tables with drop-down boxes. One of those contains snapshot date & time. Snapshots are taken every 15 minutes and so the drop-down box contains a significant amount of values, and I'd like it to default to the max value every time the report is opened.
How do I do that please?
Dan
The workaround is actually very simple!
Apply a descending sort to the drop-down list and enable the "Initially select first item" option.
I'm pretty sure this should work, but let us know.
Thanks,
Sam
Hi Sam,
I've seen the options for the Date Slider to always utilise the min and max dates, so I'm using that already on a Time Series plot.
However, to see granular information in a List Table I need to be able to select a single datetime only in a filter object - which you can do with a Date Slider, but the Date Slider doesn't "snap" to the 15 minute sections that the datetime column contains. Dragging the filter triangle on the Date Slider results in no information being shown because it'll select something like "09:08:18" instead of "09:15:00", you have to expand the calendar and manually type a Date and Time. It's not a feasible option.
Dan
The workaround is actually very simple!
Apply a descending sort to the drop-down list and enable the "Initially select first item" option.
I'm pretty sure this should work, but let us know.
Thanks,
Sam
Another thought about this -- you could force an object to always show the latest value by using a rank. I don't think that necessarily helps with your drop-down control, but it is another approach to showing the newest value.
Hi Dan,
I think the ranking does not directly help you with your issue. But you could set a ranking to select the top 1 date to create an object that always displays the data for the most recent date value.
I'm not sure if that would actually be appropriate for your report, but you seemed interested in showing the most recent date.
Sam
Hi all,
Here's how I've been selecting the max upload date by default. This will require a few different steps:
if(missing('Upload Date'p) ) return 'flag_max_upload_date'n = 1
else 1=1
How does this work?
When the drop-down list is cleared, the parameter 'Upload Date'p has no value. When it has no value, the object-level filter takes over and only returns the maximum upload date since we've defined the filter to only activate when this condition exists. When the drop-down list is selected, the object filter returns an always-true condition. In other words, the object filter does nothing, and the drop-down filter takes over.
This works in VA 7.4, 8.1, 8.2, and 8.3.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
See how to use one filter for multiple data sources by mapping your data from SAS’ Alexandria McCall.
Find more tutorials on the SAS Users YouTube channel.