Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
tamilarasu
Champion
Champion

Sum of average value in Pivot chart

Hi All,

In pivot table I need to find the total sum of average for all tables. But I got wrong value for total sum of average for each day.

Screen.PNG

Please see the attachment. Can anyone help me on this.

Thank you in advance.

Kind Regards,

Tamil

23 Replies
tamilarasu
Champion
Champion
Author

Mario: I guess we are close. But it taking average value for country code 801 and missed to take another countries (taking average for first row). I guess we need modify this statement by adding no of rows. I tried but its not working for me. Can you check?

top(Sum(Aggr(Avg(Sales), Country, day)))

Not applicable

This is what I get with the expression: IF (Dimensionality()=0, RangeSum(top(avg( Sales),1,NoOfRows()))) in the Sum Average and IF (Dimensionality()=0, IF (Dimensionality()=0, RangeSum(top(avg( Sales),1,NoOfRows()))) ,Avg(Sales))

in the Average.SC02_012015.png

tamilarasu
Champion
Champion
Author

First of all, Thank you so much for taking your time to resolve this. I guess the row names confused you. Sorry for that. Everything is fine except one thing. See below screenshot. Capture_1.PNG

**Finally I found the solution by modifying Mario's expression:

IF (Dimensionality()=0, IF (ColumnNo()=0, RangeSum(top(avg(Sales),1,NoOfRows())),Rangeavg(top(Avg(Sales),1,NoOfRows()))), Avg(Sales))

Jagan and Mario: Thanks a lot guys. Have a nice day.

Not applicable

Solution: 🙂

IF (ColumnNo()=0, RangeSum(top(avg( Sales),1,NoOfRows())),

  IF (Dimensionality()=0,

        RangeAvg(top(avg(Sales),1,NoOfRows())) ,

        avg(Sales)

))

sc_06012015.png