Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
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

Labels (1)
2 Replies
swuehl
Champion III
Champion III

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%"