Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

subtotal and total for pivot table

Hello!

I would like to sum all the values in a column in a pivot table.

It's possible for simple tables using the Chart Properties> Expressions> Totals> sum of lines but for pivot table i don't know how to do...
I've tried using the Chart Properties> Presentation> SubT otals, but the results are false...

I put an Excel file attachment. There are comments on some cells.

Thanks a lot for your help

1 Solution

Accepted Solutions
kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

     Have a look at the attched document.

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!

View solution in original post

12 Replies
SunilChauhan
Champion
Champion

try this

Chart Properties> Expressions> Totals>

Rangesum(fieldName,1,noofrows())

Sunil Chauhan
kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

HI,

   You can try below expression.

    if(sum(ACTIF_NET_GLOBAL)=0,sum(LAST_ACTIF_NET_GLOBAL), sum(ACTIF_NET_GLOBAL))

   In your pivot chart.

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
Not applicable
Author

@Sunil Chauhan

i would try but i don't understand...where can i put this expression?

When i use a pivot table, i have only the choice between : "no total", "total expression", or "sum of lines" in the box TOTALS.

SunilChauhan
Champion
Champion

first write your actual fieldname u want

and then

type this in expression

if( dimensionality()=0,

Rangesum(fieldName,1,noofrows()),sum(fieldName))

Sunil Chauhan
Not applicable
Author

hi,

thanks for yours answers..

i tried : if(sum(ACTIF_NET_GLOBAL)=0,sum(LAST_ACTIF_NET_GLOBAL), sum(ACTIF_NET_GLOBAL))

but i've the same result...

Not applicable
Author

ok thanks for explanations...

I tried

if( dimensionality()=0,

Rangesum(fieldName,1,noofrows()),sum(fieldName))

but...i've the same result with this expression

kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

   Can you upload the sample file.

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
SunilChauhan
Champion
Champion

first convert pivot into straight

then go to expression and check sum of rows

then again cconvert into pivot table

go to presentation-> show partial sum-> subtotal on top

hope you require this

Sunil Chauhan
Not applicable
Author

i've tried this solution but it doesn't work! ^^  thanks...