Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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!
Have you tried:
sum({$<Institution={'*'}>} aggr([Actual value]*[Number of Respondents],[Question number],[Institution],[Subject],[Level])) / sum([Number of Respondents])
Jason
Hi Jason,
I tried this but it give me the same result as :
sum(aggr([Actual value]*[Number of Respondents],[Question number],[Institution],[Subject],[Level]))/
sum([Number of Respondents])
What are you looking for the expression to do exactly?
So the first expression works out the Average, for what ever is selected in the app.
Then with the second expression, I want to give an Average for all Institutions, regardless of which one is selected.
ie. {$<Institution={'*'}>}
Ah - try this:
sum({$<Institution= >} aggr([Actual value]*[Number of Respondents],[Question number],[Institution],[Subject],[Level])) / sum([Number of Respondents])
It's really odd, because both expressions give the same values.
I'm going to attach the sample I'm working on to the original post
You may need to remove "Institution" from the Aggr() function.
I also tried that, but strangely it still gives the same values for both expressions..
I just had another look and think you need to add the set analysis into the second half of the equation too (although the number gets very small then!):
sum({$<Institution= >} aggr([Actual value]*[Number of Respondents],[Question number],[Institution],[Subject],[Level])) / sum({$<Institution= >} [Number of Respondents])