Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to incorporate set analysis in aggr expression-help.

Hi all,

My current expression is :

sum(aggr([Achieve.Actual value]*[Number of Respondents],[Question number],[Level]))/

sum([Number of Respondents])

BUT I'd like to incorporate this set analysis : {$<Achieve.Achievement={'First Class Honours'}>}

I've tried a few ways, but not sure which order it is supposed to be in.

Any ideas on how I could get the set analysis into the Aggr expression.

Much appreciated!!

2 Replies
Not applicable
Author

Hi beanz,

let me try a first suggestion:

aggr(   sum([Number of Respondents]),    [Question number],[Level]))

/

sum([Number of Respondents])

This is the ratio of summing up the "Number of Respondents", calculated over the dimensions "Quest Number" and "Level" and the whole sum of Number of Respondents.

Note that the aggr()-function is "outside" of your calc-function (ie sum(), avg(), ...). Check this out and after working correctly you can easily add your set analysis like this:

aggr(   sum( {$<Achieve.Achievement={'First Class Honours'}>} [Number of Respondents]),    [Question number],[Level]))

HtH

Roland

danielrozental
Master II
Master II

try

sum({$<Achieve.Achievement={'First Class Honours'}>}aggr(sum({$<Achieve.Achievement={'First Class Honours'}>}[Achieve.Actual value])*sum({$<Achieve.Achievement={'First Class Honours'}>}[Number of Respondents]),[Question number],[Level]))/

sum({$<Achieve.Achievement={'First Class Honours'}>}[Number of Respondents])