Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Conditional calculated column in pivot table

Hi everyone,

This is my first time using Qlikview and I kind of got stuck somewhere that should be relatively trivial.

I created a pivot table based on customer numbers as a dimension. Now I'm trying to create a another custom column in this table which is the sum of the sum of the amount (Amount) based on the value of another variable (X). The original table looks like this.


Customer No.
XAmount
11111110
11111150
11111160
1111124444
111116222
111116333
111116-100
11111644
111112112
111112113
111112125

The output table that I want should look like this:

Customer No.Total Amount (X=1)Total Amount (X=6)
11111120455
111112500

What I did is:

- I created a pivot table, with customer No. as Dimension

- I created two expressions, one for each extra column. The expressions are as follows:

Sum( if(X = '1', Amount))

Sum( if(X = '6', Amount))



but I'm not getting correct results. Can someone tell me what am i doing wrong here?

11 Replies
sunny_talwar

Won't know until I see it....

gksukhi
Contributor
Contributor

I wanted to get individual sales for employees , when I use a similar expression as you mentioned, it gives me the total sum for all the employees....Why is it so?