Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I need to add a calculated column i.e. I have 4 columns in my existing data, once this data is uploaded in Qlikview I need to add a calculated column (calculation will be based on 2 existing columns) which will be my 5th column in my dataset. This new column will be used in different char/graphs. How can I achieve this?
To be able to use the same calculated field in different charts, calculate it in the script like:
Load
FieldA,
FieldB,
FieldA*100+FieldB AS calculatedField
from <>;
Hi,
When you load your table you can add fields as you like.
For example, if you are loading the following table:
Load A,
B
FROM File;
You are able to do something like this:
Load A,
B,
A + B as C,
A - B as D
FROM File;
Regards.
What type of calculations you need to perform. ??
-Nilesh
Hi Abhinav,
1.You can create column by creating a field(Result of Calculated two columns) in load script.
and select the create field in chart.
2.Create a expression in Expression tab of a chart
Thank guys but is there a possibility of doing the same without using script? I mean, using some option in Qlikview after loading the data.
Yes using expressions as Nitha says, in my example you can do a expression as sum(A) + sum(B) or sum(A + B) depending of you want.
try:
Table2:
LOAD
IDKey,
sum(data1) as Data1Sum,
sum(data2) as Data2Sum
Resident Table1;
LEFT JOIN (Table2)
LOAD
IDKey,
Data1Sum-Data2Sum as DifferenceSum
Resident Table2;
Is this what you are looking for?
Thanks,
Angad