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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

get rid of a dimension in a pivot table

Hi,

Let say I havea pivot table like :

Product1 Product2 Product3

Nb Sales Amount Nb Sales Amount Nb Sales Amount

Sales Man

John 2 20 3 23 5 500

Mark 4 30 3 15 3 350

I would like to add a column that does the following calculation

Product n / Product 1 To get a ratio.

Does anybody has a solution ?

Thanks

Philippe

1 Solution

Accepted Solutions
Not applicable
Author

When you can be sure that Product 1 is in column 1 you can use the following expression:

Sum(Amount)/First(Sum(Amount),1)

This results in:

Product Prod1Prod2Prod3
SalesMng NbSalesAmountProd n/Prod 1NbSalesAmountProd n/Prod 1NbSalesAmountProd n/Prod 1
John2201,03231,1550025,0
Mark4301,03150,5335011,7
Total6501,06380,8885017,0


I hope this is what you mean


View solution in original post

2 Replies
Not applicable
Author

When you can be sure that Product 1 is in column 1 you can use the following expression:

Sum(Amount)/First(Sum(Amount),1)

This results in:

Product Prod1Prod2Prod3
SalesMng NbSalesAmountProd n/Prod 1NbSalesAmountProd n/Prod 1NbSalesAmountProd n/Prod 1
John2201,03231,1550025,0
Mark4301,03150,5335011,7
Total6501,06380,8885017,0


I hope this is what you mean


Not applicable
Author

Thanks a lot.

That does exactly what I need.

Philippe