Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
tracycrown
Creator III
Creator III

Index

Dear all

Kindly advise how to compute Average Sales grouped by Quarters?.

Correct answer is shown below :

tYearQuarterSalesINDEX
120141         4.8          5.7
220142         4.1          5.2
320143         6.0          7.1
420144         6.5          7.5
520151         5.8          5.7
620152         5.2          5.2
720153         6.8          7.1
820154         7.4          7.5
920161         6.0          5.7
1020162         5.6          5.2
1120163         7.5          7.1
1220164         7.8          7.5
1320171         6.3          5.7
1420172         5.9          5.2
1520173         8.0          7.1
1620174         8.4          7.5

 

Thank you

Tracy

 

Labels (1)
1 Solution

Accepted Solutions
Gysbert_Wassenaar

Try Avg( TOTAL <Quarter> Sales)


talk is cheap, supply exceeds demand

View solution in original post

6 Replies
tracycrown
Creator III
Creator III
Author

Dear all

Sorry, I forgot to enclose the files, please refer to attached file for details.

Thank you

Tracy

Gysbert_Wassenaar

Create a table or chart with Quarter as dimension and Avg(Sales) as expression.


talk is cheap, supply exceeds demand
tracycrown
Creator III
Creator III
Author

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

 

 

Gysbert_Wassenaar

Try Avg( TOTAL <Quarter> Sales)


talk is cheap, supply exceeds demand
sathishbabu_s_g
Contributor III
Contributor III

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)

Gysbert_Wassenaar

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...


talk is cheap, supply exceeds demand