Exploring, predicting and reporting with SAS Visual Analytics and SAS Visual Statistics

Button on VA Report to "Clear all Filters"

Reply
Contributor
Posts: 59

Button on VA Report to "Clear all Filters"

Button on VA Report to "Clear all Filters"

 

i sometimes have multiple filters on tab on a report in VA.

is it possible to provide a button or link on a report that clears all the user entered filters?

Occasional Contributor
Posts: 6

Re: Button on VA Report to "Clear all Filters"

I'm afraid there is no such button available in VA. However you can get the same effect by refreshing a report. This trick clears all filters and recovers a start version of the report :-)

SAS Super FREQ
Posts: 76

Re: Button on VA Report to "Clear all Filters"

 That's correct. This capability doesn't exist, but I'd like to suggest a workaround that hopefully will help you.

 

First, you will need a source table with one character column (you can call it Reset_Release for example) and two rows, like below (make sure that table is loaded in memory):

 

Reset_Release source table

 

Next, add a button bar object to your report and assign the Reset_Release column to its category role. Create and assign a character parameter (let's call it p_Button) to this button bar. Make sure that Required is checked under the button bar Properties tab. Optionally you can make the button to grow vertically instead of horizontally, which is the default, and it would look like this:

 

Reset button

Suppose you have a category called Product that you want to add to a control object. Create a calculated item (let's call it Resetable Product) that is defined with the expression below. Observe that the yellow rectangle contains an empty string "" (missing), and not "text string" (but it could actually contain any value that does not exist as a product in our particular case - for example, it could be something like "Click Release to populate" - this will get clear at the end).

 

Expression for Resetable Product

 

Assign Resetable Product in the category role of your control object.

 

To reset values that might be selected in the control object, you must first click on Reset, then click on Release in the button bar.

 

When you click on Reset in the button bar, Resetable Product resolves to missing and the control object will display only the missing value. At that moment, if there were products selected in the control object, the selections would be lost. When you click on Release in the button bar, Resetable Product resolves to Product and the control object is populated back, but none of its values will be selected.

 

Best,

Renato

 

Frequent Learner
Posts: 1

Re: Button on VA Report to "Clear all Filters"

Posted in reply to Renato_sas

Hi renato_sas 

how can u have new column  Reset_Release in source table

can u brief about that

Thank You

SAS Super FREQ
Posts: 76

Re: Button on VA Report to "Clear all Filters"

Hi,



You can simply create an Excel or csv file with one column and two rows and have it loaded in memory, or, depending on your current source table, you might be able to derive the new column Reset_Release from your existing table, without the need to load a new one. I have not tried it yet, but this is how it would work:



Suppose you have in your source table a column called Gender, which values are "M" and "F". You could create a calculated item or a custom category to map "M" to "Reset" and "F" to "Release". Even if your chosen source column has more than two values, such as Continent, with 7 distinct values, you could map 4 or them to be "Reset" and the rest to be "Release". You could also use a numeric column to derive the new Reset_Release column. Imagine your numeric column has values ranging from 1 to 10. You could say that values less than 5 would be mapped to "Reset" and the rest to "Release". The most important thing in this process is that you must guarantee that there will be at least one value in your data that will be mapped to "Reset" and at least one value that will be mapped to "Release". If you can't guarantee that, the loading a small table like I've explained above is your only option.



Best,

Renato


Ask a Question
Discussion stats
  • 4 replies
  • 1230 views
  • 2 likes
  • 4 in conversation