BookmarkSubscribeRSS Feed
ashishj816
Quartz | Level 8

Hi All,

 

Based on filters can we hide and show columns which are present in cross tab.

4 REPLIES 4
Kurt_Bremser
Super User

Please provide the code that creates the cross tab, and tell us which columns you do not want, and the logic for filtering them out.

Providing usable source data (data step with datalines) will most probably speed up the process of finding a useful answer.

ashishj816
Quartz | Level 8
This will be on SAS VA Part in Dashboard
Sam_SAS
SAS Employee

Hello,

 

I don't think you can hide the entire column (including the column heading.)

 

What you can do is make all of the values missing, which will cause the table/crosstab to aggregate as if the column were not there.

 

Here is a nonsense example with SASHELP.CARS:

 

filter.png

Let's say we want to ignore the Drivetrain column when "Asia" is selected in the button bar.

 

First we make a character parameter and assign it to the button bar.

Then we create a calculated item that uses that parameter:

IF ( 'Parameter 1'p NotIn ('Asia') )
RETURN 'DriveTrain'n
ELSE ''

Now when we select "Asia" in the button bar, we get this:

 

filter1.png

If you want the button bar to ONLY set the parameter and not also filter the data, be sure to place the button bar in the body of the report page and not in the prompt area.  That would give this result, which might be closer to what you wanted:

filter2.png

 

It's not exactly what you are looking for, but I hope this might help.

 

Thanks,
Sam

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
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
  • 1851 views
  • 0 likes
  • 3 in conversation