BookmarkSubscribeRSS Feed
dstephens22
Obsidian | Level 7

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

 

4 REPLIES 4
acordes
Rhodochrosite | Level 12

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.

 

a1.pnga2.png

 

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 ) ) ) )

 

 

dstephens22
Obsidian | Level 7

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

acordes
Rhodochrosite | Level 12

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;
dstephens22
Obsidian | Level 7

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.

 

 

sas-innovate-2024.png

 

Time is running out to save with the early bird rate. Register by Friday, March 1 for just $695 - $100 off the standard rate.

 

Check out the agenda and get ready for a jam-packed event featuring workshops, super demos, breakout sessions, roundtables, inspiring keynotes and incredible networking events. 

 

Register now!

Tips for filtering data sources in SAS Visual Analytics

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.

Discussion stats
  • 4 replies
  • 1014 views
  • 0 likes
  • 2 in conversation