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: 
Anonymous
Not applicable

Dimension in pivot table

Dear all,

I'm wondering if it is possible to use a calculated dimension into pivot table in the following way

Pivot tabel

Customer     TOTAL SALES          % of TOTALSALES

A                    1000                                   10%

B                    2000                                   20%

C                    5000                                   50%

...

The table above has two dimensions: Customer and TOTAL SALES  (aggr (sum(Sales), Customer)

How can I calculate the espressione % of TOTALE SALES ? Is it possible to use the dimension TOTAL SALES ?

I'm a bit confused.

Thanks in advance

2 Replies
swuehl
MVP
MVP

Not sure why you want or need a calculated dimension for this ( I would use just an expression for TOTAL SALES, sum(Sales) ), but the % should look like this in both cases:

=sum(Sales) / sum(total Sales)

This gives different values than in your sample:

A        12.5 %

B        25 %

C        62.5 %

but this looks correct for me (assuming a total Sales of 8000).

Stefan

whiteline
Master II
Master II

Hi, Stefan.

It's look like he've  skipped "D - 2000 - 20%"