Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Sxbbb
Creator III
Creator III

I want ' Stroke_real_time' Latest day minus previous day

I extracted data from excel file.

 use code

Sxbbb_0-1676427852161.png

of the date 01/02/2023

Sxbbb_1-1676432446451.png

of the date 01/03/2023

Sxbbb_0-1676432726304.png

I want Stroke_Day = Stroke_real_time on 01/03/2023 minus Stroke_real_time on 01/02/2023.

 I want Stroke_Day = Stroke_real_time Latest day minus previous day

3 Replies
sidhiq91
Specialist II
Specialist II

@Sxbbb  Please follow the below script code in your load editor and let me know if it worked.

NoConcatenate
Temp:
Load
E_Date,
Series_Number,
Stroke_Real_Time
inline [
E_Date,Series_Number,Stroke_Real_Time
01/02/2023,S/N=399607,6641042
01/02/2023,S/N=399608,3389333
01/02/2023,S/N=401428,3161321
];

left join (Temp)
//NoConcatenate
Temp1:
Load
E_Date as E_Date1,
Series_Number as Series_Number,
Stroke_Real_Time as Stroke_Real_Time1

inline [
E_Date,Series_Number,Stroke_Real_Time
01/03/2023,S/N=399607,6683697
01/03/2023,S/N=399608,3425896
01/03/2023,S/N=401428,3200763
];

NoConcatenate
Temp2:
Load E_Date1,
Series_Number,
Stroke_Real_Time1,
Stroke_Real_Time,
Stroke_Real_Time1-Stroke_Real_Time as Stroke_Date
Resident Temp;

Drop table Temp;

Exit Script;

sidhiq91_0-1676773644413.png

 

Sxbbb
Creator III
Creator III
Author

I have every day's data. and daily updates

sidhiq91
Specialist II
Specialist II

@Sxbbb  I believe this logic should work. Please give it a try and let me know in case of any issues.