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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

load (distinct) help needed!

Hi guys,

Just a quick question. I wish to load only distinct records so I therefore thought (after looking at the manual) that putting eg

LOAD

DISTINCT(field),

field2....etc

from......

would work? This is not the case. Anyone wish to shed some light?

Thanks for the help!

6 Replies
Anonymous
Not applicable
Author

LOAD distinct
field,
field2,
...
From...;

Not applicable
Author

I thought it was too easy to be true 🙂

Thanks for help...

bc

Not applicable
Author

Actually sorry,

That didn't seem to work.

I have a table with ProblemID and a list of other fields. There are Problem Id's with the same Id. The only way in that they differ is the end date. I am only looking to display the ProblemId with the most recent end date. Is this possible?

Regards,

bc

Not applicable
Author

ya try peek(endday) or Previous(endday) must solve your problem according to your use.

Not applicable
Author

Try

LOAD

ProblemID,

MAX(EndDate)

From.......

GROUP BY ProblemID;

Regards,

Joao

Not applicable
Author

Add a Right Join too,

Right Join ( OriginalTable)

Load ProblemID,Max(EndDate) as EndDate

Resident OriginalTable

Group By ProblemID;

This should exclude all the other records, and will keep only one record per problemID