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

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
ajaykumar1
Creator III
Creator III

Average help

Hi Everyone,

Greetings of the day !.

I need some help to calculate the average formula with below mentioned output format.

I tried like this ;  avg(aggr(sum(amount),[week]))

Please find the attached sample data.

Input Data :

 

IDWeekamount
1375500
13820000
14513000
14724000
15024000
54015000
54417000
104350000
124680000
1247

70000

Week is my dimension.I taken in Pivot table for to fulfil in horizontal way.

Out put :

   

IDWeek373840434445464750Grand TotalAverage
1 550020000 13000 24000240008650017300
5 15000 17000 3200016000
10 50000 5000050000
12 8000070000 15000075000
Total55002000015000500001700013000800009400024000318500

More Thanks,

Ajay

10 Replies
Peter_Cammaert
Partner - Champion III
Partner - Champion III

Dim is a field belonging to a so-called date island. This means that it has no association with any of the other fields or tables in your data model. Using Dim with other fields and expressions in a chart will produce a cartesian product, meaning that both Dim values are artificially combined with everything in your table. The Pick function intercepts certain parts and returns a week number when Dim = 1, and a text value 'Total' when Dim = 2.

This is called a calculated dimension.

Best,

Peter