Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Average sum group by months in load script

Good day!

In load script i load table from excel:

Main:

LOAD

  Id,

  Year(Date)&num(Month(Date),'00') as YearMonth,

  avg(Sum)

  FROM

$(DataPath)Test.xlsx

(ooxml, embedded labels, table is Sheet1)

;

in result i get table:

  

IdDateSum
101.01.20154
102.01.20156
103.01.20154
104.01.20156
105.01.201537
106.01.20154
107.01.20152
108.01.20157
109.01.20154
101.02.20154
102.02.20156
103.02.20153
104.02.20156
105.02.20153
106.02.20151
107.02.20153
108.02.20155
109.02.201576

How i load script calculate average sum group by YearMonth?

My necessary result:

Id     YearMonth     Sum

1     201501     8.2

1     201502    11.8

Thanks.

11 Replies
Anonymous
Not applicable
Author

no. not only 1.

There will be more values

pratap6699
Creator
Creator

=aggr(avg(sales),month)