Qlik Community

QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

Not applicable

Pivot table % of Total

How is a "% of total column" done in a pivot table?

I know how to do this using a straight table, but we need a pivot table.

The 1st column will be Product family,
the 2nd column will be Sum(Sales) and
the 3rd column will be % of total Sales.

Thanks

Tags (2)
1 Solution

Accepted Solutions
Not applicable

Pivot table % of Total

Hi danhilz,

You have to put in the expression of the third column:

Sum(Sales) / Sum(TOTAL Sales)

Maybe it works

9 Replies
Not applicable

Pivot table % of Total

Hi danhilz,

You have to put in the expression of the third column:

Sum(Sales) / Sum(TOTAL Sales)

Maybe it works

pkelly
Valued Contributor

Pivot table % of Total

=Sum(Sales) / Sum(TOTAL Sales)

Think the above should work for you...

Not applicable

Pivot table % of Total

Thank worked.

Thanks.

alwinsch
Contributor

Re: Pivot table % of Total

Hi,

Since i'm new to QV

and i found this correct answer... but unfortunately i doesn't work for me.

could you help me please?

I attached the QV document.

kind regards,

Alwin

Not applicable

Re: Pivot table % of Total

Hi Alwin,

Your code syntax was wrong, correct syntax attached

Regards

Kulbir

Highlighted
alwinsch
Contributor

Re: Pivot table % of Total

Hi kulbir,

Sorry for my late response.

And first of all thanks for the help, but when i paste your syntax in my QVW file

it gives me an error:

=sum([Totaal v/h Jaar]) / sum(TOTAL [Totaal v/h Jaar])

It says that the Fieldname is not correct.

But it is correct!

Kind regards.

Alwin

Not applicable

Re: Pivot table % of Total

Alwinsch,

are you sure that you're not using the Label instead of the Field name as in the file you attached earlier? Try and open the Edit Expression dialog, and select the field you want to use in the drop-down list furthest down on the dialog, and hit the paste button where you want it to go.

Regards

S

alwinsch
Contributor

Re: Pivot table % of Total

Fseijsing,

Yes i'm sure it is not in the label:

the label says : 'Aandeel in portefeuille '

I cannot select the fields, because it is already an expression.

I can type in the beginning of the expression and intellisense does the rest...

so i know it is the correct way to write the variable... because it is case sensitive

regards,

A.

alwinsch
Contributor

Re: Pivot table % of Total

Hi all,

I solved it!

Changed pivot table to a normal table

and then i could use the 'Relative' option.

Regards,

Alwin

Community Browser