Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Dear all
Kindly advise how to compute Average Sales grouped by Quarters?.
Correct answer is shown below :
t | Year | Quarter | Sales | INDEX |
1 | 2014 | 1 | 4.8 | 5.7 |
2 | 2014 | 2 | 4.1 | 5.2 |
3 | 2014 | 3 | 6.0 | 7.1 |
4 | 2014 | 4 | 6.5 | 7.5 |
5 | 2015 | 1 | 5.8 | 5.7 |
6 | 2015 | 2 | 5.2 | 5.2 |
7 | 2015 | 3 | 6.8 | 7.1 |
8 | 2015 | 4 | 7.4 | 7.5 |
9 | 2016 | 1 | 6.0 | 5.7 |
10 | 2016 | 2 | 5.6 | 5.2 |
11 | 2016 | 3 | 7.5 | 7.1 |
12 | 2016 | 4 | 7.8 | 7.5 |
13 | 2017 | 1 | 6.3 | 5.7 |
14 | 2017 | 2 | 5.9 | 5.2 |
15 | 2017 | 3 | 8.0 | 7.1 |
16 | 2017 | 4 | 8.4 | 7.5 |
Thank you
Tracy
Dear all
Sorry, I forgot to enclose the files, please refer to attached file for details.
Thank you
Tracy
Create a table or chart with Quarter as dimension and Avg(Sales) as expression.
Dear Gysbert
It works when I create another table but it dos not work if I present in the same table next to Sales Column, please advise.
Thank you
Tracy
Try Avg( TOTAL <Quarter> Sales)
Hi,
I use to do using below logic usually, using <Quarter> on the expression comes under set expression ? I would like to know other possibilities using this approach rather than aggr 🙂
aggr( avg(Sales), Quarter)
Perhaps this blog post explains things: https://community.qlik.com/t5/Qlik-Design-Blog/When-should-the-Aggr-function-NOT-be-used/ba-p/146785...