Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
Please have a look at attachment for details.
Thanks,
Nihhal.
S:
LOAD PatID, Code, Date
FROM [Source.xlsx] (ooxml, embedded labels, table is DB);
S1:
NoConcatenate
load PatID, Code, Date as EndDate
Resident S
Where PatID <> Peek('PatID')
order by PatID, Code desc;
left join (S1)
load PatID, Code +3 as Code, Date as StartDate
Resident S;
DROP Table S;
Hi Nihhal,
May be as at attached file.
Regards,
Andrey
do you already have a flag that specifies start and end date?then just use
Max({<Dateflag={'StartDate'}) Date) for StartDate
and Max({<Dateflag={'EndDate'}) Date) for EndDate
Hi Andrey,
Thanks for your attachment.
Actually i have to give logic while extracting data from table (edit script) instead of UI.
I need to extract only required records from data source (latest startdate and enddate per each patid) instead of all records.
S:
LOAD PatID, Code, Date
FROM [Source.xlsx] (ooxml, embedded labels, table is DB);
S1:
NoConcatenate
load PatID, Code, Date as EndDate
Resident S
Where PatID <> Peek('PatID')
order by PatID, Code desc;
left join (S1)
load PatID, Code +3 as Code, Date as StartDate
Resident S;
DROP Table S;