Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello folks,
I have sample input data as below
Need output as show in screen shot attached jpg file . I need to do this using QlikView script , any help is highly appreciated as I am running under tight deadline of project
Replace the seqkey with timestamp and see if it works
Hi
try to do something like this:
NoConcatenate
START:
LOAD *,
RowNo() as ID,
If(Previous(status)=status,status & RowNo(),status) as Dimension;
LOAD
status,
date as start
Resident TABLE
Where Index(rec_status,'start')>0
Order By status,date
;
Left Join
LOAD
RowNo() as ID,
If(Previous(status)=status,status & RowNo(),status) as Dimension,
end
;
LOAD
status,
date as end
Resident TABLE
Where Index(rec_status,'end')>0
Order By status,date
;
DROP Table TABLE;
Thanks a lot, I will try
Gopal, just wanted to see if you got things figured out here? If so, be sure to use the Accept as Solution button on any of the posts from folks that helped you get things working. If you did something different, consider posting that and then mark that as the solution so others will know what worked. If you still need help, drop an update on where things stand.
Regards,
Brett
Create a group based on the each start and end and do the max and min based on that group
clar:
LOAD * INLINE [
F1, F2, F3
Clarification Start, Clarification, 1/1/2018
, Clarification, 1/4/2018
Clarification End, Clarification, 1/2/2018
Maintenance Start, Maintenance, 1/5/2018
, Maintenance, 1/6/2018
Maintenance End, Maintenance, 1/7/2018
Maintenance Start, Maintenance, 1/8/2018
, Maintenance, 1/9/2018
, Maintenance, 1/10/2018
, Maintenance, 1/11/2018
Maintenance End, Maintenance, 1/12/2018
];
load
* ,
if( RowNo()=1 ,1 ,
if( wildmatch(F1,'*Start*') or IsNull(Peek(F1)) , peek(row)+1, peek(row) )) as row
Resident clar ;
DROP Table clar;
Calulate Min/Max based on row and F2 field