Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
Save the Date: QlikWorld Online, June 24-25, 2020. Free global virtual event for data integration and data analytic gurus. Register Today
Highlighted
Partner
Partner

Re: QLIKVIEW script - Need help in transforming data , based on Sample work data Need output as in

Replace the seqkey with timestamp and see if it works

Highlighted
Partner
Partner

Re: QLIKVIEW script - Need help in transforming data , based on Sample work data Need output as in

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;

Highlighted
New Contributor III

Re: QLIKVIEW script - Need help in transforming data , based on Sample work data Need output as in

Thanks a lot, I will try

Highlighted
Digital Support
Digital Support

Re: QLIKVIEW script - Need help in transforming data , based on Sample work data Need output as in

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

To help users find verified answers, please do not forget to use the "Accept as Solution" button on any post(s) that helped you resolve your problem or question.
I now work a compressed schedule, Tuesday, Wednesday and Thursday, so those will be the days I will reply to any follow-up posts.
Highlighted
Valued Contributor II

Re: QLIKVIEW script - Need help in transforming data , based on Sample work data Need output as in

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