Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
colinodonnel
Creator II
Creator II

AGGR Expansion

Hello,

How can  expression 1 and 2 be amended to function in the same way as expression 3 please?

1.  avg(aggr( Sum(  Sales ), ReportMonth, Company))

2. StDev(total  aggr(  Sum( Sales), ReportMonth))

3. Sum(  total <Company> Sales ) /  Count( distinct Total   ReportMonth)

The Qlik Sense table of data is below. The values in column 4 / 5 should match column 3 i.e split per Company and not across the entire dataset.

CompanyReportMonthSum( total <Company> Sales ) /

Count( distinct Total   ReportMonth)
avg(aggr( Sum( Sales ), ReportMonth, Company))StDev( total aggr( Sum(   Sales), ReportMonth))

A2018085,16242271,035
A2018095,16256401,035
A2018105,16244381,035
A2018115,16269071,035
A2018125,16244791,035
A2019015,16245081,035
A2019025,16265201,035
A2019035,16256251,035
A2019045,16236131,035
A2019055,16260661,035
A2019065,16247351,035
A2019075,16251861,035
B2018085,79665801,035
B2018095,79646421,035
B2018105,79669491,035
B2018115,79644821,035
B2018125,79663911,035
B2019015,79654691,035
B2019025,79653761,035
B2019035,79663441,035
B2019045,79650341,035
B2019055,79664811,035
B2019065,79658371,035
B2019075,79659621,035

 

Many thanks,

Colin

ps. I'd like to be able to upload the dataset and sample app but cannot do so for some reason.

1 Solution

Accepted Solutions
sunny_talwar

May be this

 

1. Avg(TOTAL <Company> Aggr(Sum(Sales), ReportMonth, Company))

2. StDev(TOTAL <Company> Aggr(Sum(Sales), ReportMonth, Company))

 

View solution in original post

2 Replies
sunny_talwar

May be this

 

1. Avg(TOTAL <Company> Aggr(Sum(Sales), ReportMonth, Company))

2. StDev(TOTAL <Company> Aggr(Sum(Sales), ReportMonth, Company))

 

colinodonnel
Creator II
Creator II
Author

Thank you