Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

% of Sales in a pivot

Hi

I am trying to calculate % of sales using a pivot ,with 2 dimensions ( Regions , Products)

Desired output :


Region  Product 1  Product 2  Product 3

America     30%      40%          30%

Asia           40%       40%          20%

Europe        60%      10%          30%

However

If i use sum(Sales) / sum( TOTAL Sales)  , the % is split across the 3*3 and everything adds upto 100%  , which is not the case

Hence not usefuk

I want for each row to add to upto 100%

Please help

thanks

1 Reply
rubenmarin

Hi Karthik, you can use

sum(Sales) / sum(TOTAL <Region> Sales)