Hope you can help me with this problem.
I want to create a table in which I have values for current day and for previous day.
The script looks something like :
if(match(kpiNo,15,16,17,18,19,20,21),Value01*(-1),Value01) as Value1,
LOAD sum(Value) as Value01,
date( floor( DATE ))as DATE,
Group By DATE,
drop Table BS;
Value1 as Value,
'CD' as PointInTimeVersion
if(Name_Kpi =Previous(Name_Kpi), Previous(Value1),0) as Value,
'PD' as PointInTimeVersion
Order by kpiNo,DATE;
drop Table temp;
But the problem is that for Previous Day I`m getting same values as for current day. Can you please help me? Or if you know another way to calculate Previous Day in Loading Script please tell me.