Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Select distinct rows for many fields

Hi,

I would like to have a button/text so as to select rows with distinct values from various fields. That is to select the unique rows for 2/3/4... fields (the combination of these fields to act as a primary key). I know that QV might have a problem and "don't know" which row to select but is there a way to pick one of the multiple ones by picking e.g. the first as they are sorted or by following some defined sorting rule?

Thanks

2 Replies
beristardj
Creator
Creator

good day.

One idea applies this in two loads.

supose

one table called test

the name of fields

a,b,c,d,e,f

you clean for distinct in fields b,d,f

in first load use hash

fristload:

load

a,b,c,d,e,f,

hash(b,d,f) as key resident test ;

in second load use distinct

secondload:

load distinct key,

a,b,c,d,e,f resident firstload ;

i hope this idea server to you...

jagan
Luminary Alumni
Luminary Alumni

HI,

Can you come up with some sample data and expected output so that it would be easier to answer.

Regards,

Jagan.