BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
cokeyng
Obsidian | Level 7

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

1 ACCEPTED SOLUTION

Accepted Solutions
Stu_SAS
SAS Employee

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:

Stu_SAS_0-1657651630715.png

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.

 

hide-object.gif

 

 

Finally, here's what it all looks like in action:

indirect-filter.gif

 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;

 

View solution in original post

6 REPLIES 6
MarkusWeick
Barite | Level 11

Hi @cokeyng,

I am sceptical about the possibilities within VA 7.5.

Which Version of VA are you using?

Best

Markus

Please keep the community friendly.
Like posts you agree with or like. Mark helpful answers as “accepted solutions”. Generally have a look at https://communities.sas.com/t5/Getting-Started/tkb-p/community_articles
cokeyng
Obsidian | Level 7
SAS Visual Analytisc 8.5.2 on Viya 3.05
Stu_SAS
SAS Employee

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:

Stu_SAS_0-1657651630715.png

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.

 

hide-object.gif

 

 

Finally, here's what it all looks like in action:

indirect-filter.gif

 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;

 

MarkusWeick
Barite | Level 11

Hi @Stu_SAS, Hi @cokeyng,

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

Please keep the community friendly.
Like posts you agree with or like. Mark helpful answers as “accepted solutions”. Generally have a look at https://communities.sas.com/t5/Getting-Started/tkb-p/community_articles
cokeyng
Obsidian | Level 7
Thanks, @Stu_SAS, I will give it a try.
cokeyng
Obsidian | Level 7

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

SAS Innovate 2025: Call for Content

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!

Submit your idea!

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
  • 6 replies
  • 1201 views
  • 1 like
  • 3 in conversation