# New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
Qlik® Product Spotlight: Discover what’s possible. Get more from our products.
See for yourself. Register today.
New Contributor III

## Pivot Table Percentage

Hello Everyone, good afternoon, I mounted this Pivot Table:

But must group calculate the percentage for the subtotal indicated like this :

 Prod % 0 0.00% 0 0.00% 0 0.00% 0 0.00% 1 2.08% 3 6.25% 7 14.58% 9 18.75% 28 58.33% 48 100%

These are my expressions :

Prod: SUM(QTDMOT)

%: QTDMOT/Sum(QTDMOT)

They could assist me ?

1 Solution

Accepted Solutions
MVP

## Re: Pivot Table Percentage

Try this:

Sum(QTDMOT)/Sum(TOTAL <DTCONTRATO, DsFilial> QTDMOT)

Tested this on a sample

Table:

Dim, Dim2, Date, Value

A, AA, 01/01/2016, 10

A, AB, 01/01/2016, 30

B, BB, 01/02/2016, 20

B, BA, 01/02/2016, 90

A, AA, 02/01/2016, 40

A, AB, 02/01/2016, 20

B, BB, 02/02/2016, 60

B, BA, 02/02/2016, 30

];

5 Replies
Honored Contributor II

## Re: Pivot Table Percentage

Have you check 'Show Partial Sums' for all of your dimensions in Presentation Tab?

Valued Contributor II

## Re: Pivot Table Percentage

Try Sum(QTDMOT)/Sum(Total <DTCONTRATO> QTDMOT)

New Contributor III

## Re: Pivot Table Percentage

Hi,

I tried the 2 suggestions but did not reach my goal.

I changed the expression of percentage for this :
SUM ( QTDMOT ) / Sum ( TOTAL < DsMotivo , DsFilial > QTDMOT )

It is now almost certain , only that the calculation is performed accounting every month .
It must be calculated by individual total each month and respecting the dimension =MonthName(DTCONTRATO)

MVP

## Re: Pivot Table Percentage

Try this:

Sum(QTDMOT)/Sum(TOTAL <DTCONTRATO, DsFilial> QTDMOT)

Tested this on a sample

Table:

Dim, Dim2, Date, Value

A, AA, 01/01/2016, 10

A, AB, 01/01/2016, 30

B, BB, 01/02/2016, 20

B, BA, 01/02/2016, 90

A, AA, 02/01/2016, 40

A, AB, 02/01/2016, 20

B, BB, 02/02/2016, 60

B, BA, 02/02/2016, 30

];

New Contributor III

## Re: Pivot Table Percentage

Perfect ! It worked I appreciate the help of all !

Community Browser