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-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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
  • 1139 views
  • 0 likes
  • 3 in conversation