Hi:
I created a parameter on product that I added as a role to a button bar. I then added it to a text Box. When the button is clicked it will display the product in the text box (part of a title). If nothing is clicked it says "<No Item Selected>.
Is there a way to get this to say "All Products"
Thanks,
Dave
The first pragmatic approach is to prefix the parameter in the text box with the reading "Filter applied".
the second solution is a workaround with a dummy data set which you can use for the button bar design, this prevents the data from being filtered.
You can customized categories on the dummy char var, here 3 brands + "All products".
you assign a parameter to it which will be used in the object filter.
I attach screenshots.
IF ( 'selected'p = 'All Products' )
RETURN ( 1 = 1 )
ELSE (
IF ( 'selected'p = 'Volkswagen' )
RETURN ( '_brand'n = 'Volkswagen' )
ELSE (
IF ( 'selected'p = 'Audi' )
RETURN ( '_brand'n = 'Audi' )
ELSE (
IF ( 'selected'p = 'SEAT' )
RETURN ( '_brand'n = 'SEAT' )
ELSE ( 1 = 2 ) ) ) )
Thanks for the quick reply. I'm probably not following since these don't seem to be working. Are all three screen shots part of the same solution or the code for the dummy dataset? I tried creating a calculated item but I get type mismatches.
I can get the filter to show All Products in the Text box but as soon as you click another filter it defaults back to <No Item Selected>. Ugh
you have to create the dummy_va table via data step in sas studio.
once done, load into the report.
1) apply customized category matching your class variable levels that you use currently. Add "All Products" for all remaining values
2) at page expand level use this newly created custom category in a button object INSTEAD of the one you're using currently
3) assign a parameter to this button bar
4) use the parameter in the text box
5) use the advanced filter option for the object being filtered
6) paste the logic of my previous post and adapt it to your class level names
data casuser.dummy_va(promote=yes);
do number=1 to 25;
num_char=put(number,best12.);
output;
end;
run;
thanks again. quick question does this only work in VA 8.2 (Viya)? I am only VA 7.5, SAS 9.4.
I am missing something here, since I am still having issues. I will continue to work on it.
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 16. 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.