Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to get this set analysis into aggr expression(nested)

Hi,

I have the expression

sum(aggr([Actual value]*[Number of Respondents],[Question number],[Institution],[Subject],[Level])) / sum([Number of Respondents]) which works, but I now need to incorporate this simple set analysis into it : {$<Institution={'*'}>}

I'm unsure of which order it needs to be in and seem to be going around in circles.

Any ideas on how it can be changed to bring the two expressions into one.?

Thank-you!

25 Replies
Not applicable
Author

Yes, that is absolutely correct.

Jason_Michaelides
Luminary Alumni
Luminary Alumni

OK - I'm starting to get it.  Off we go again...

Jason_Michaelides
Luminary Alumni
Luminary Alumni

Hang on - look at this screenshot.  What does that mean!? 19 students answered Q18 at one time and 63% got it right, then at some other point in time another 24 students answered Q18 and this time 83% got it right?

22-09-2011 19-01-51.png

Not applicable
Author

Let's ignore the samole I posted earlier, because that data was for illustration purposes and to be honest, the data is a bit dodgy.

Here is a sample of the real data taken for 1 Institution, for 1 Question(Question1), for 1 Level.

InstitutionSubjectLevelQuestion numberanswered 1answered 2answered 3answered 4answered 5Actual valueNumber of RespondentsQuestion Average
Institution1(L1.03) Biological SciencesFirst degreeQ11%1%3%57%38%0.951350.163
Institution1(L1.11) Social studiesFirst degreeQ11%7%6%65%20%0.86690.076
Institution1(L1.13) Business and Administrative studiesFirst degreeQ10%5%7%62%25%0.88450.050
Institution1(L1.14) Mass Communications and DocumentationFirst degreeQ10%4%11%65%20%0.85450.049
Institution1(L1.15) LanguagesFirst degreeQ10%0%1%44%55%0.99520.066
Institution1(L1.16) Historical and Philosophical studiesFirst degreeQ10%0%0%45%55%1350.045
Institution1(L1.17) Creative Arts and DesignFirst degreeQ12%1%8%63%26%0.891910.217
Institution1(L1.17) Creative Arts and DesignOther undergraduateQ12%4%7%47%40%0.87550.061
Institution1(L1.18) EducationFirst degreeQ10%0%4%77%19%0.96260.032
Institution1(L1.20) Initial Teacher TrainingFirst degreeQ12%2%6%65%26%0.911320.153
7850.091

So if you add up the %'s answered from 1-5, we get 100%, then it gives the Actual Number that were actually answered. See the first one-95%. This was from 135 Respondents.

The Question average is then worked out as: Actual value multiplied by Number of Respondents then this divided by the total number of respondents for this Question, ie. 785....giving us 16.3% for Biological Sciences.

Jason_Michaelides
Luminary Alumni
Luminary Alumni

WhiteFlag.gif

Best I can do is attached mate (green table).  It might be getting on the right lines but my head hurts now.  (Doesn't help that I've been hungover all day...)

Hope you get it sorted.

Jason

Not applicable
Author

Well with a lot of trial and error I managed to get the result I was hoping for.

sum(aggr(sum({$<Institution = >} [Actual value]*[Number of Respondents]),[Question number]))

/sum({$<Institution = >} [Number of Respondents])

Thanks for all of your help.!