In case that's true yes you can do it by using a dummy table for creating a customized category, attach a parameter to it and use it in new data item within an if-then-statement. return the variable you want the user to select between. use this dynamic data item as role (for example x) in the graph.
Where 'LABEL HERE' refers to the value of the button the user selected, and 'Var 1'n/'Var 2'n refer to your variables you'd like to switch between. In the image shown above, the labels are "MPG (City)" and "MPG (Highway)."
Add the new calculated variable to your graph
Add a new button bar populated with the label names you would like to use. In the paper Arne linked, p. 6-7 shows one way to achieve this; however, you can create the same labels using your existing dataset. You'll need to be careful so that they do not get filtered out by report-level or page-level filters.
When users select buttons, the variable in the graph will automatically change. The downside of this is that the variable being shown has a static name. You'll want to add the parameter to dynamic text so that users are aware of what they are looking at.
2. Viewer Data Edits
Works on: VA 8.4+
If you change the Viewer Customization level for the report to "Data Edits" under the Report Options pane, report viewers can modify graphs to display which variables they would like to see:
This way the user can create their own analysis with the variables you leave unhidden.
Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.
If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website.