Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Home
- /
- SAS Viya
- /
- Visual Analytics
- /
- SAS Visual Analytics: Let user choose multiple variables displayed to ...

Options

- RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page

🔒 This topic is **solved** and **locked**.
Need further help from the community? Please
sign in and ask a **new** question.

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

Posted 06-28-2018 09:10 AM
(1300 views)

Hello,

I am working with **SAS Visual Analytics 7.4**. I would like to know is it possible to let user to define the variables to show in a graph? I have seen solutions where parameters were used to display one measure but I want user to define the measures to be displayed.

Originally my data is like the example below. I have an ID variable, three measures and a categorical variable indicating time of measurement. I would like present these result ideally in a trellis plot where each subject would be displayed in a separate graph, but VA doesn't support this. On the X-axis I have the Time variable, on the Y-axis I would have the measurements chosen by the user. User would be able to select A, B and C or A and C or only B etc. from List object. Is this possible to implement with a line graph?

ID | A | B | C | Time

---+---+----+--+-------

A1 | 2 | 4 | 5 | After

A1 | 7 | 3 | 8 | Before

B4 | 1 | 4 | 5 | After

B4 | 5 | 3 | 8 | Before

C3 | 2 | 4 | 5 | After

C3 | 2 | 2 | 8 | Before

Don't hesitate to ask more info if needed.

- Tags:
- SAS VA

1 ACCEPTED SOLUTION

Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

Hi!

I think you can do this by using parameters and calculated measures.

As an example you can have one list box with one selection for each combination (and one parameter assigned to the list box) or one listbox for each measure (and one parameter for each measure/list box).

Your calculated measures check the value of the parameter(s) and either set the value to the original measure or to missing, something like this:

calculated measure a_calc:

IF parameter1 = 'A' then a else .

calculated measure b_calc:

IF parameter1 = 'B' then b else .

calculated measure c_calc:

IF parameter1 = 'C' then c else .

then use these calculated variables in your graph.

Might work 🙂

Another way is to transform your data and create a dimension containing the measures (a,b and c) and then stack your graph on that dimension...

//Fredrik

2 REPLIES 2

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

Hi!

I think you can do this by using parameters and calculated measures.

As an example you can have one list box with one selection for each combination (and one parameter assigned to the list box) or one listbox for each measure (and one parameter for each measure/list box).

Your calculated measures check the value of the parameter(s) and either set the value to the original measure or to missing, something like this:

calculated measure a_calc:

IF parameter1 = 'A' then a else .

calculated measure b_calc:

IF parameter1 = 'B' then b else .

calculated measure c_calc:

IF parameter1 = 'C' then c else .

then use these calculated variables in your graph.

Might work 🙂

Another way is to transform your data and create a dimension containing the measures (a,b and c) and then stack your graph on that dimension...

//Fredrik

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

This worked! Thank you very much Fredrik!

- Laine

- Laine

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. **

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.