Discussion board where members can get started with QlikView.
Hi all i have problem in chart calculation
for 1st row of calculation i.e., for date 28/12/18 which is a dummy record joined with the fact table so for
each fund(a,b,c....) the 28/12/17 were added, for all funds with 28/12/17 as 1st row and calcualtion i need is (Qty/nv)*Rate and
from 2nd row and above (above of calulation field) /(1+Coresponding level field values)
Date Qty/Nv level Rate Value(Calculation)
28/12/18 11.2 3 11.2*3=33.6 (only for 1st row i.e., for date 28/12/18 calculation (Oty/nv)*Rate)
27/12/18 22.2 40 4 33.6/(1+40)=0.81 from 2nd and above the calculation is (Above(Value)/(1+coresponding level)
26/12/18 32 50 6 0.81/(1+50)=0.66 continue as above..........
use below script
Test:LOAD * INLINE [
Date, Qty/Nv, level, Rate
28/12/18 , 11.2, , 3
27/12/18 , 22.2, 40, 4
load Date, [Qty/Nv], level,
Rate,RowNo() as Flag
order by Date desc;
drop table Test;
load Date,level,[Qty/Nv],Rate, if(Flag=1, [Qty/Nv]* Rate,Previous(([Qty/Nv]* Rate))/(1+level)) as Calculation
drop table new;
Please look here Re: Chart function
What problem do you face exactly?