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

1 Solution

Accepted Solutions
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

View solution in original post

23 Replies
tresesco
MVP
MVP

Trying this expression:

If(SecondaryDimensionality() = 0, Sum(Aggr(Avg(Sales), Country)), Avg(Sales))

tamilarasu
Champion
Champion
Author

Hi Tresesco,

Thank you for the reply. I have tried and still getting the same result.

Capture.PNG

jagan
Luminary Alumni
Luminary Alumni

Hi,

Try this expression

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

Regards,

Jagan.

kushalthakral
Creator III
Creator III

Hi Tamil

i have tried, please check the screenshot below:

result.jpg

tamilarasu
Champion
Champion
Author

Hi Jagan,

Thanks working fine and I will mark it as correct answer.. I have one more request. Is it possible to get total sum of all average values instead of average of all average values like below screenshot.?

New.PNG

tamilarasu
Champion
Champion
Author

Hi Kushal,

Yes. Its working. Thank you for checking.

jagan
Luminary Alumni
Luminary Alumni

Hi,

What is your expected value?

Regards,

Jagan.

tamilarasu
Champion
Champion
Author

It should be displayed as 3798 in total. I have attached screenshot above.

Not applicable

Just for the Records, this one also works and place the - in the upper rows.

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