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: 
Not applicable

AVG FUNCTION

Hi

I am new to qlikview can any one suggest me how to bring Avg in qlikview

My requiremnet is as below

GRPApr-13May-13Jun-13Jul-13Aug-13Sep-13Oct-13Nov-13Dec-13Grand TotalAVG
A 971114598394288293110059709708799978
B 90376310558598126735923643646385709
C 7088757426535917036008898896650739
D 00000296224424260467
E 7384142331482462861441371372483276
F 6890134105168124961761761137126
G 14382118491135953717175984
H36394557841401882092091007112
I 484223594568173848462670
J 58787269283937303044149
Grand Total367335283405294129693319311229722972288913210

Data Attched herewith

1 Solution

Accepted Solutions
tresesco
MVP
MVP

4 Replies
tresesco
MVP
MVP

PFA

Anonymous
Not applicable
Author

hi ,

load all your data in QVW,

use a straight table ,

ADD dimension GRP in Straight table dimension tab,

then go to expression tab add two expression

1. for sum

=sum([Apr-13]+ [May-13]+[Jun-13]+[Jul-13]+[Aug-13]+[Sep-13]+[Oct-13]+[Nov-13]+[Dec-13]) 

2.  for average

=rangeavg([Apr-13], [May-13],[Jun-13],[Jul-13],[Aug-13],[Sep-13],[Oct-13],[Nov-13],[Dec-13])

<<PFA >>

Best

Anant

Gysbert_Wassenaar

You can't have two total columns, one for total sum and one for average. What you can do is add a calculated dimension. This calculated dimension can't be displayed on the right side of the pivot table, only on the left with the other dimensions. Or you can create a second pivot table (or straight table) with only the GRP dimension and the avg expression. You can then align that second table with the first.

See attached qvw for both options.


talk is cheap, supply exceeds demand
mahesh_agrawal
Creator
Creator

Awesome use of Dimensionality()

Well done pal. 🙂