Hi all,
I have a data souce like this.
Recrod 1, Record 2
Facility Name= Facility A, Facility B
Facility Size= 25 to 50, 75 to 100
Facility Region=AB, ON
Revenue=10M, 25M
I want to be able to select a value in Facility Name, like "Facility A", then assign multiple ParamFN="Facility A", ParaFS="25 to 50", ParamFR=AB. so that these parameters can be used in filter or formula separate as I want to display the revenue of the facility, the aggregated revenue of all "25 to 50" and aggregrted revenue of all "AB" side be side.
Is this doable in VA?
Thanks
Cokey
Hi @cokeyng, this is a case of indirect filtering. You're on the right track by thinking of parameters. We'll solve it by creating three list tables that do all the filtering we need, but we'll hide the list tables that do indirect filtering. Here's the basic concept:
Indirect Filtering
One way to do indirect filtering is by passing the values of required list tables into object filters. For example, when we select Facility A, the list control can filter a list control for Region. This will only show the region for Facility A. The parameter will take on that value.
Since the parameter always has a value, we can pass that value into a key value object:
'Facility Region'n = 'Region'p
Now we have indirect filtering!
Hiding the Extra List Controls
We do not want the extra list controls visible. The easiest way to do that: put them in a precision container, then drag a text box on top of it and set its background to white. This will effectively hide the controls from view and prevent users from interacting with them.
Finally, here's what it all looks like in action:
Here's some sample data if anyone would like to give it a try themselves:
cas;
caslib _ALL_ assign;
data casuser.facilities(promote=yes);
length facility_name $12.;
infile datalines dlm=',';
input facility_name$ facility_size$ facility_region$ revenue;
datalines;
Facility A, 25 to 50, AB, 10000000
Facility B, 75 to 100, ON, 25000000
Facility C, 25 to 50, AB, 10000000
Facility D, 75 to 100, AB, 10000000
Facility E, 25 to 50, ON, 25000000
;
run;
Hi @cokeyng,
I am sceptical about the possibilities within VA 7.5.
Which Version of VA are you using?
Best
Markus
Hi @cokeyng, this is a case of indirect filtering. You're on the right track by thinking of parameters. We'll solve it by creating three list tables that do all the filtering we need, but we'll hide the list tables that do indirect filtering. Here's the basic concept:
Indirect Filtering
One way to do indirect filtering is by passing the values of required list tables into object filters. For example, when we select Facility A, the list control can filter a list control for Region. This will only show the region for Facility A. The parameter will take on that value.
Since the parameter always has a value, we can pass that value into a key value object:
'Facility Region'n = 'Region'p
Now we have indirect filtering!
Hiding the Extra List Controls
We do not want the extra list controls visible. The easiest way to do that: put them in a precision container, then drag a text box on top of it and set its background to white. This will effectively hide the controls from view and prevent users from interacting with them.
Finally, here's what it all looks like in action:
Here's some sample data if anyone would like to give it a try themselves:
cas;
caslib _ALL_ assign;
data casuser.facilities(promote=yes);
length facility_name $12.;
infile datalines dlm=',';
input facility_name$ facility_size$ facility_region$ revenue;
datalines;
Facility A, 25 to 50, AB, 10000000
Facility B, 75 to 100, ON, 25000000
Facility C, 25 to 50, AB, 10000000
Facility D, 75 to 100, AB, 10000000
Facility E, 25 to 50, ON, 25000000
;
run;
that looks really good @Stu_SAS . I will try it in VA 7.5 too.
For the newer VA version I have thought of two calculated items using the AggregateTable operator (https://communities.sas.com/t5/SAS-Communities-Library/SAS-Visual-Analytics-Advanced-Calculations-pa...
But your solutions looks much better.
Best
Markus
Hi @Stu_SAS ,
I was actually working on the same line. In my testing page, I created a few combo boxes, for Region, Size and more.
The trick is to make the combo boxes "Required", which can be found in the Options Tab of the Drop-Down List.
Thanks again.
Cokey
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.