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

Pivot Table Average problem

Hi I have brands and products in the dimension of the table. I want to take the average of their score in the pivot table:

Brand NameProduct NameScoreavg

Brand 1

Product 1100250
Brand 1Product 2200250
Brand 1Product 3300250
Brand 1Product 4400250

I want to make the table as shown above when the dimensions are all expanded. When I collapse the product name field, it works well but when I expand it, it will show the exact value of the score on the avg field.Can you help me doing this?

Thank you

13 Replies
MK_QSL
MVP
MVP

Try

Avg({1}TOTAL Score)

VishalWaghole
Specialist II
Specialist II

Hi,

Please find attached file, it will help you.

- Regards,

Vishal Waghole

Not applicable
Author

Brand NameProduct NameScoreAvg
Brand 1 Prod 1.1100150
Brand 1Prod 1.2200150
Brand 2Prod 2.1300400
Brand 2Prod 2.2500400

I forgot to mention that there are other brands in the table. Therefore I need to calculate all the brands' average individually.

its_anandrjs
Champion III
Champion III

Write in new expression for pivot table

Avg({1} ALL Score)

Not applicable
Author

Hi Anand. It calculates the avg of the score of all brands but I need to take the average of only the corresponding brand.

MK_QSL
MVP
MVP

Try

AVG({1}TOTAL <[Brand Name]> Score)

or

AVG({TOTAL <[Brand Name]> Score)

its_anandrjs
Champion III
Champion III

Ok then try like

Avg(ALL <[Brand Name]> Score)

richard_pearce6
Partner - Specialist
Partner - Specialist

Try  avg(aggr(avg(Score),[Brand Name]))

Richard

qlikcentral | Understand / Create / Inform

Not applicable
Author

Hi thanks for help. These expressions work but only when the product field is collapsed. When I expand the dimensions the avg(score) equals to the sum(score).