BookmarkSubscribeRSS Feed

Dear,

 

I am working with a client and I have requirement as decsribed below

 

1. There is list of variables in the drop down list which is around 100 variables. Users will select one of the variable from this list.

2. There is a graph and list table which is populate the values of that variable. variable which is select by user in the drop down list.

 

I can easily do this by using a parameter in the list table and create calculated field using that parameter. This involves if else condition. Problem is that I have 100 of variable and list will keep on increasing. I can not have so many if else condition.  And if new variable is added because it will be not part of nested if else I will have to modiy that everytime. This is not desirable in the case of client I am working.  

 

Any solution will be helpful.

 

If  I am EG to create this report I can use a macro variable using prompt option and user can select the desired variable from that prompt list. Lets say that macro variable is Selected_Variable. lets assume user wants to see mean of Revenue/Cost/profit

 

. I will write the following program

 

Proc Means data=dataset;

var &Selected_Variable;

run;

 

Second example

 

Data test;

set dataset;

 

Target_variable=&Selected_Variable;

run;

 

 

&Selected_Variable this will resolve to variable Revenue if user selects Revenue in the prompt. Likewise for all other cases.

 

In VA if create a new calculated field and assign to that parameter. It treats as character and new field will have the value of parameter. This not having the value of parameter varibales value.

 

Any suggestion how to implement this. Please Please.....

1 REPLY 1
meredithbailey
SAS Employee

Hello lokendra_devangan_corecompete_com,

Have you tried using parameters to create cascading prompts? By using cascading prompts, it will lessen the number of variables. Please reference the link attached below which will go into more detail about cascading prompts. Please notify me if you have any more questions regarding this issue.

 

https://communities.sas.com/t5/SAS-Visual-Analytics/Dependency-between-drop-down-list/td-p/164710

 

Best, 

Meredith Bailey 

 

 

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
  • 1 reply
  • 1518 views
  • 1 like
  • 2 in conversation