Skip to main content

App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Announcements
QlikWorld 2023, a live, in-person thrill ride. April 17 - 20, 2023, in Las Vegas! REGISTER TODAY
cancel
Showing results for 
Search instead for 
Did you mean: 
Ori
Contributor III
Contributor III

Averaging on groups where the overall fact count is over the general average

hi everyone,

i'm looking for a way to average the row count but only for groups that have a higher row count than the general average by group.

this is the measure i was trying to use:

avg(aggr(count({<assignment_group = {">avg(aggr(count(distinct sys_id),assignment_group))"}>}distinct sys_id),assignment_group))

pretty sure there is something pretty simple and stupid i'm missing.

thanks in advance.

ori.

Labels (1)
2 Replies
Digvijay_Singh

May be something like this - 

avg(aggr(count({<assignment_group = {"=$(=avg(aggr(count(distinct sys_id),assignment_group))) > $(=avg(count(distinct sys_id)))"}>}distinct sys_id),assignment_group))

luizcdepaula
Creator III
Creator III

Hi Ori,

If you are trying to use the average total as your baseline, you  need to add the inital measure first, and then add the comparison with the Total to your average statement. Find it below.

avg(aggr(count({<assignment_group = {"=avg(aggr(count(distinct sys_id),assignment_group))> avg(TOTAL aggr(count(distinct sys_id),assignment_group))"}>}distinct sys_id),assignment_group))

I hope it works,

Luiz