BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
ghartge
Quartz | Level 8

Greetings everyone,

 

OK, I need some help...again. I have a dataset that contains course enrollment information. The data has various attributes for a course, such as division, department, program, section, seats allocated, seats filled (enrollment), campus, etc. I would like to have the ratio of enrollment to seats filled done in VA due to the various selections a user may require. 

 

I can calculate the ratio of each course, which I have done in EG, to the level of the most attributes, i.e.

Division, Department, program, campus location, time of day, section, course. 

The problem is when I need to display a more global summary, say only to the course by itself

(Division, Department, Program, COURSE

I can only get the summation of the ratios in the data, not simply the ratio of the displayed values of enrollment and seats allocated.

 

I attached an image I hope helps clarify what I am trying to accomplish.

 

I am thinking this isn't possible in SAS VA 7.3.

 

Thanks,

 

Gary

1 ACCEPTED SOLUTION

Accepted Solutions
ghartge
Quartz | Level 8

I solved the issue. I know I attempted this prior to my question but perhaps I had focus on a different area than I needed to be. I don't know but you simply create an "Aggregated Measure"

 

Sum [_ByGroup_] ('Enrollment'n) / Sum [_ByGroup_] ('Seats Allocated'n)

 

 

Aggrgated_Measure.jpg

View solution in original post

3 REPLIES 3
shantanupl1
Obsidian | Level 7
Try this code:

proc sql; create table want as select distinct course, sum(seat_allocated) as seat_allocated, sum(enrollment) as enrollment, (calculated seat_allocated/calculated enrollment) as fill_ratio from have group by course; quit;

 

ghartge
Quartz | Level 8

Thanks, shantanupl1,

Yes, I can do that (and have) in my EG program that generates the data for my report. I am trying to accomplish the same inside of SAS VA using a Crosstab. I am unable to find a way to display a ratio as you described using VA when a user wishes to see the values at the course level only. VA will sum the ratio values and display a total of those values so we have ratios of 13.69 instead of .933 (or 93.3%) for example.

Gary

ghartge
Quartz | Level 8

I solved the issue. I know I attempted this prior to my question but perhaps I had focus on a different area than I needed to be. I don't know but you simply create an "Aggregated Measure"

 

Sum [_ByGroup_] ('Enrollment'n) / Sum [_ByGroup_] ('Seats Allocated'n)

 

 

Aggrgated_Measure.jpg

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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
  • 3 replies
  • 3048 views
  • 0 likes
  • 2 in conversation