Discussion board where members can get started with QlikView.
I'm trying to sum two column totals. What I need is a new column,where I will show sum of two previous columns.
I want a new column as Fruits=15
Similar way I want the difference of those two columns
load col1+col2 as fruits, col1, col2;
Can you paste the table for some values?
Diff=Count(Col1)-Count(Col2) or viceversa
RangeSum(Col1, Col2) as Fruits
Col1+Col2 as Fruit // this won't work if there are null values
Alt(Col1,0)-Alt(Col2,0) as Difference
Col1-Col2 as Difference // this won't work if there are null values
Do you need to represent this in UI or you want this for script
For UI you can easily do this by Pivot table
In chart you have do do like
Assume Column One is
And Column two is
Column(1) + Column(2)
And you need this in the expression or load script.
If load script then
LOAD Apples,Grapes,Apples+Grapes as Sum;
LOAD * Inline