Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
saurabh5
Creator II
Creator II

Pivot Table (weighted Avg) issue.

Hello All,

I am trying to create a pivot table in QlikView and perform a weighted average calculation, I have 3 dimensions(AREA, AREA 2, PRODUCT CODE) while two metric fields (RATE and Factor), I am trying to get the value in F14 cell (green colored ) which is basically derived by sum(Rate*Factor)/  sum(Rate).  I tried using Aggr and avg function  but somehow not able to get the right value.

Attached is the sample data set I used for the below pivot.  Thanks for the help !

2 Replies
Anil_Babu_Samineni

I haven't see any difficult in your expression, What are you getting when you use same as your expression

Or else, Try this way

Avg(Aggr((Sum(Rate*Factor)/Sum(Rate)), AREA, [AREA 2], [PRODUCT CODE]))

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
settu_periasamy
Master III
Master III

Hi saurabh,

may be try this..

if(Dimensionality()=3,sum(factor),
Sum(TOTAL<[AREA 2]>Rate*factor)/Sum(TOTAL <[AREA 2]>Rate))

Capture.JPG