I think there are tow tasks:
First, having overlapping groups (which doesn't work in one costum category).
Second, showing different columns based on a button bar selection.
(For the second task @Sam_SAS showed a nice workaround in Solved: Creating dynamic measures in stacked bar chart - SAS Support Communities)
Hi @vallsas,
please give the following apporach a try:
1.1 Button bar for selection of parameter values
1.1.1 Defining and uploading the values for the Buttons
We build an Excel file (“Groupings 2.xlsx”) with one column which contains the possible parameter values, which we want to show on the buttons of the button bar under a column name:
We then upload this table into VA.
1.1.2 Definiton of a character parameter
We define a new data item as parameter of type “Character” and name it “Choice”
1.1.3 Definition of a button bar
We drag a button bar object to the report page.
Before we assign the roles to the button bar, we activate the table with the values we want to assign with the button bar:
Then we assign the roles to the button bar:
2.1 Calculated item which contains the chosen group
Now we define a “new calculated item”:
With nested if-clauses we get a column which contains the values for the group which is defined by the choice in the button bar (via the parameter):
1.4 Creating an object that shows the calculated item
If we want to omit the line with the missing values, we can add a filter to the list table and deactivate the “Include missing values” option:
Hi @vallsas,
did it work for you?
Best
Markus
Hi Markus,
department | task_list |
aaa | 1001 |
bbb | 1002 |
ccc | 1003 |
ddd | 1004 |
ccc | 1004 |
ccc | 1005 |
there is no column which contains groups with all value , so I cant choose in the if condition to select the values.
requirement is : when we use button bar by department we get as per the example: 5 dep and on the same button bar we would like to have All so when user would like to see statistics of all the all the departments stats then he will choose all otherwise dept.
as we don't have all in the new customized category as I have created custom category to define the 5 groups and in the custom category we dont have options to choose all as one group.
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
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.