Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
suvechha_b
Creator III
Creator III

Unable to sort Ukey

Hello  All

I am unable to sort the Ukey field ..please assist. samplemodel attached.

Sort.PNG

13 Replies
suvechha_b
Creator III
Creator III
Author

HI PM,

Its still not working ,

I did some change and create UniqueKey (UK) with the Date and previousdealid .

and tried your script .

"OpenUser_final4":

NoConcatenate

LOAD

UK,

DateJoinKeyPL, 

  deal1, 

    dealnm1, 

    previousdealid,

if(count(UK)>1,0,1) as FlagLateststate

Resident "OpenUser_final3"

GROUP BY UK,

DateJoinKeyPL, 

  deal1, 

    dealnm1, 

    previousdealid;


But still not Flag is correct . Sample model attached. Please kindly assist.


See the outcome table .

Req.PNG


prma7799
Master III
Master III

On which field you want to do Flag ...

OpenUser_final3":

NoConcatenate

LOAD

DateJoinKeyPL,

  deal1,

     dealnm1,

     previousdealid,

if(count(previkey)>1,1,0) as FlagLateststate

Resident "OpenUser_final2"

GROUP BY DateJoinKeyPL,

  deal1,

     dealnm1,   

     previousdealid;

please share sample qvd.

suvechha_b
Creator III
Creator III
Author

I did provide you sample model.

Is there any way to compare the value of same field by previous ()

if values match with the previous then flag 0 else 1.

Req.PNG

suvechha_b
Creator III
Creator III
Author

Count is not working as because qlikview is treating the two highlighted row as two different rows . Which is not correct to my requriement.

Req1.PNG