Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
Make your voice heard! Participate in the 2020 Wisdom of Crowds® Survey. BEGIN SURVEY
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
gopal5879
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 don't forget to use the "Accept as Solution" button on any posts that helped you resolve your problem or question.
Highlighted
qliksus
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