Qlik Community

Qlik DataMarket Discussions

Discussion Board for collaboration regarding Qlik DataMarket.

sagarrahul
New Contributor III

repeated data

this is my table

      

policy_noREGISTRATION_NUMSTART_DATEEND_DATEDATE_OF_LOSSresult
2312200173578978UP-15-AR-246220-Dec-201119-Dec-201228-Dec-20112312200173578600
2314200255005000UP-15-AR-246208-Jan-201307-Jan-2014 2314200255003700

and below table is as my output

       

policy_noREGISTRATION_NUMSTART_DATEEND_DATEDATE_OF_LOSSresultPOL_START_DATE
2314200255005000UP-15-AR-246208-Jan-201307-Jan-201429-May-2012231420025500370008-Jan-2013

how should i get my output :

when  REGISTRATION_NUM is repeated two times but with two different policy as in first table

then is should give result as shown in 2nd table

then while giving output we should check that date of loss (as shown in bold ie "28-Dec-2011")of old or previous policy should be less than of START_DATE(as shown in bold ie '08-Jan-2013') new policy but it should have same REGISTRATION_NUM .

i want in script form not in load form

9 Replies
krishna20
Valued Contributor

Re: repeated data

use firstsorted value

firstsortedvalue(policy_no,-REGISTRATION_NUM)

you will get proper result

Re: repeated data

How you get

29-May-2012

krishna20
Valued Contributor

Re: repeated data

same you can use from script but you need group by primery key

krishna20
Valued Contributor

Re: repeated data

that will not possiblle if data is not avalaible 29-may-2012

sagarrahul
New Contributor III

Re: repeated data

so what to do

Re: repeated data

@krishna20  Better you edit or add in your previous reply rather than giving many one line replies.

This will make post very clear to understand.

krishna20
Valued Contributor

Re: repeated data

if posiible share your sample data

krishna20
Valued Contributor

Re: repeated data

sure manish

Thanks

sagarrahul
New Contributor III

Re: repeated data

1234MH-01-CB-112307-Apr-201419-Apr-2014
5678HP-78-BU-45608-Apr-201420-Apr-2014
8912DL-04-CNB-78909-Apr-201421-Apr-2014
4321MH-01-CB-112322-May-2014
Community Browser