Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
Leverage your QlikView investment to modernize BI – see how! Join Group
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Creator II
Creator II

Separation of conditions in Script

Hi Friends!

I've got some problem with separation of conditions of policies.

We have the table:

4.png

And I know that for the policy "1" - the final condition - "Active" for the date: 31.08.2012, for the date: 31.08.2011 - condition "DC 1", for the date: 31.08.2010 - condition "DC 2" and so on...

Everything depends on number of change of conditions (No of States) and dates (BEGIN).


For instance for policy - "3", we've got only two conditions, Active - 25.06.2015 and DC 1 - 31.08.2014.

My task - is to make artificial field with names of conditions "Active", "DC 1", "DC 2", ...How I can do that ?

May be i need to Order by POLICY asc, and BEGIN desc, and to use the "Previous()" or "Peek()" functions, but how i find the second and third and rest conditions? May be i need to use some FOR...NEXT loop by rows ?

Hope i clearly explaned my problem.

Please help !

Any script, thoughts, advices?

P.S.: Source app in attachment.

Thanks in advance.