BookmarkSubscribeRSS Feed
SurajChand
Obsidian | Level 7

I have a table where student id and their education level as mentioned below.

 

Student_id Education_level
112 10th
114 12th
224 phd


we need a report (SAS Visual Analytics) where a calculated item or (any other workaround) works as when we insert a student id then it returns the education level and based on that education level we need all respective student id which are equal to that education.

1 REPLY 1
Sam_SAS
SAS Employee

Hello,

 

Could you tell us a little more about what you want to do?

 

If I understand correctly, you want to have a control where the selected student ID will select all students that have the same education level as the selected student.

 

I don't know that there's an easy way to do this directly, but a workaround is possible by combining the values of the two columns using the Concatenate function in a calculated item to give you something like "112 | 10th" as the value. Then you could store that in a parameter and make an advanced filter based on the second part of the value.

 

Here is an example using the SASHELP.CLASS dataset:

 

class2.png

I concatenated the Name and Gender columns in an expression like this: 

Concatenate(Concatenate(Name, ' | '), Gender)
The syntax is slightly different in the latest versions of VA, but this should give you the general idea.
I assigned a parameter to the drop-down list control to store this value.
In the list table, I made an advanced filter,
NOT(IsSet('Name and Gender Parameter'p)) OR (GetWord('Name and Gender Parameter'p, 2) = Gender)
This will show all values if nothing is selected in the drop-down, or else filter on the part of the selected value that comes after the "|" character.
 
Some extra work would be necessary if you want to select all students with the selected education level or less, but it should be possible with some tedious IF statements.
Let us know if that helps, or if what you wanted was something else.
Sam

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
  • 1 reply
  • 207 views
  • 0 likes
  • 2 in conversation