Hi Friends!
I've got some problem with separation of conditions of policies.
We have the table:
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.