Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Not applicable

Remove duplicate an leave higher value

Hello,

I am having trouble removing the duplicates from my load. I know I am able to remove duplicates by using the distinct load, but that doesn't allow me to pick wich values are the ones that stay.

Thanks!

Tags (1)
1 Solution

Accepted Solutions
marcus_malinow
Valued Contributor II

Re: Remove duplicate an leave higher value

Hi Sara,

one technique might be to calculate the value field you are interested in, and JOIN this back on to your original table. For example:

OriginalTable:

LOAD

    key,

    value,

    etc, etc....

FROM

[wherever your original source is];

INNER JOIN (OriginalTable)

LOAD

    key,

    max(value) as value

RESIDENT OriginalTable

GROUP BY key;

1 Reply
marcus_malinow
Valued Contributor II

Re: Remove duplicate an leave higher value

Hi Sara,

one technique might be to calculate the value field you are interested in, and JOIN this back on to your original table. For example:

OriginalTable:

LOAD

    key,

    value,

    etc, etc....

FROM

[wherever your original source is];

INNER JOIN (OriginalTable)

LOAD

    key,

    max(value) as value

RESIDENT OriginalTable

GROUP BY key;