Skip to main content
Announcements
Customer Spotlight: Discover what’s possible with embedded analytics Oct. 16 at 10:00 AM ET: REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Pivot table

Someone please help~~~

I have a pivot table which display the sales of customers for 2 different category of product (A and B).

Now I wants to add another column which display the Different between them (Just like the one in red box). What should I do??

Untitled.png

1 Solution

Accepted Solutions
Not applicable
Author

Hi Sharon,

If it is exactly 2 categories, then do the following

1. Add Date and Customer as Dimension in your Pivort Chart Object

2. Don't use Cateogry as Dimension, instead use it in expression as condition

3. Add first expression: Sum(If(Category='A',Sales))

4. Add secnod expression: Sum(If(Category='B',Sales))

5. Add third expression: Sum(If(category='A',Sales)) - Sum(If(Cateogry='B',Sales))

View solution in original post

5 Replies
er_mohit
Master II
Master II

simply write

column(1)-Column(2)

Not applicable
Author

Hi Sharon,

If it is exactly 2 categories, then do the following

1. Add Date and Customer as Dimension in your Pivort Chart Object

2. Don't use Cateogry as Dimension, instead use it in expression as condition

3. Add first expression: Sum(If(Category='A',Sales))

4. Add secnod expression: Sum(If(Category='B',Sales))

5. Add third expression: Sum(If(category='A',Sales)) - Sum(If(Cateogry='B',Sales))

Not applicable
Author

If I do this. it will look like this:

Untitled2.png

I don't think they will agree with this looks and feel..... so I must change the category Dimension in order to display the way the they wants....

I already updated my expression to handle the calculation. but I really dun know how to add the "Diff" in the dimension.....

Not applicable
Author

Oh yes!!! you are correct... is the matter of pivoting~~~ thank you so much!!!!!

Not applicable
Author

No, you can drag and drop the Customer dimension below expression header. Qlikview pivot table will allow you to do that