16 Replies Latest reply: Feb 12, 2018 9:13 AM by Kizzy Davies

# Qlik Sense - Totalling row sum in a pivot table

Hello,

I cannot find an answered question regarding this topic.

I have a pivot table where the row measure are an average of a data field.  When I click add totals in the it adds up the total records and not the totals of each row.  Please see below totals do not add up to the totals of all the other rows.

Thanks,

Kizzy

• ###### Re: Qlik Sense - Totalling row sum in a pivot table

Add the total in ur dimensions:

exmple:

• ###### Re: Qlik Sense - Totalling row sum in a pivot table

Hi Omar,

I tried that and it still does not show the total of the rows.

Thanks,

Kizzy

• ###### Re: Qlik Sense - Totalling row sum in a pivot table

What exactly is your expression here? Are you using Dimensionality() somewhere in your expression?

• ###### Re: Qlik Sense - Totalling row sum in a pivot table

Hi Sunny,

not sure what you mean by dimensionality but I am using the following

MEASURE     -     Avg([Days In Status])

Thanks,

Kizzy

• ###### Re: Qlik Sense - Totalling row sum in a pivot table

And you want to see the sum of rows as your total, right?

Check this

Sum of rows in pivot tables ‒ QlikView

Basically, wrap your expression around with Sum(Aggr()) function and see if that works for you

Sum(Aggr(Avg([Days In Status]), <Dimension/s>))

• ###### Re: Qlik Sense - Totalling row sum in a pivot table

Hi Sunny,

I am using QLIK Sense not Qlik View and the sum does not work, it does not bring up any results.  Any ideas?

Thanks,

kizzy

• ###### Re: Qlik Sense - Totalling row sum in a pivot table

There is not much difference between QlikView and Qlik Sense when it comes to this kind of expression. Anyways, would you be able to share a sample to see what might be going on?

• ###### Re: Qlik Sense - Totalling row sum in a pivot table

Hi Sunny,

Thanks,

Kizzy

• ###### Re: Qlik Sense - Totalling row sum in a pivot table

This isn't complete... where is the dimension in here?

• ###### Re: Qlik Sense - Totalling row sum in a pivot table

Hi,

I added the dimension but it still does not work.

Thanks,

Kizzy

• ###### Re: Qlik Sense - Totalling row sum in a pivot table

Dimension doesn't have to between <>. That was just to show that the you need to put your dimension/s here....

• ###### Re: Qlik Sense - Totalling row sum in a pivot table

Hi Sunny,

I amended the expression but now it only shows the total and the first column of data titled default.  below shows all the other columns which should also be included.

Thanks,

Kizzy

• ###### Re: Qlik Sense - Totalling row sum in a pivot table

You have two dimension, don't you? You need to add all of them into your expression

Sum(Aggr(Expression, Division, [Application Status]))

• ###### Re: Qlik Sense - Totalling row sum in a pivot table

it works thanks!!

• ###### Re: Qlik Sense - Totalling row sum in a pivot table

Sthing like this:

sum(AGGR(Avg(Days),Division,Status))

• ###### Re: Qlik Sense - Totalling row sum in a pivot table

Hi Omar

Days in Status is field that contains numerical data and I want the average calculation to display on the pivot table and the total of those figures to show in the total.  I don't know how splitting the days and status into 2 sections will work?

Thanks,

kizzy