turn on suggestions

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

Showing results for

Find a Community

- Home
- /
- BI
- /
- Visual Analytics
- /
- SAS Visual Analytics: Let user choose multiple var...

Topic Options

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

- Mark as New
- Bookmark
- Subscribe
- RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

06-28-2018 09:10 AM

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.

Accepted Solutions

Solution

06-29-2018
03:47 AM

- Mark as New
- Bookmark
- Subscribe
- RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to Laine

06-28-2018 09:31 AM

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

All Replies

Solution

06-29-2018
03:47 AM

- Mark as New
- Bookmark
- Subscribe
- RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to Laine

06-28-2018 09:31 AM

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
- RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to FredrikE

06-29-2018 03:47 AM

This worked! Thank you very much Fredrik!

- Laine

- Laine