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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Load Max

Hello

I have the following data set:

IdStage 2DateRank
1Stage 1 01/01/20111

2

Stage 201/01/20112
3Stage 301/01/20113
4Stage 101/01/20111
5Stage 201/01/20112
6Stage 301/01/20113
7Stage 101/01/20111
8Stage 201/01/20112
9Stage 301/01/20113

I would like to only rows with the highest 'rank' (Max)

So only Id's 3,6,9 would be loaded,

I think the issue lies with my 'GROUP BY':

LOAD

id,

[Stage 2],

Date,

MAX(Rank) as Rank

FROM

Data\Stage2.qvd (QVD)

GROUP BY id;

If anyone can assist it would be appreciated.

Thanks

Jeremy

Labels (1)
1 Solution

Accepted Solutions
lironbaram
Partner - Master III
Partner - Master III

hei

you have a problem with your Group by

your load script should be something like

LOAD

id,

MAX(Rank) as Rank

FROM

Data\Stage2.qvd (QVD)

GROUP BY id;

Left join

Load

id,

[Stage 2],

Date,

Rank

FROM

Data\Stage2.qvd (QVD)

GROUP BY id;

View solution in original post

1 Reply
lironbaram
Partner - Master III
Partner - Master III

hei

you have a problem with your Group by

your load script should be something like

LOAD

id,

MAX(Rank) as Rank

FROM

Data\Stage2.qvd (QVD)

GROUP BY id;

Left join

Load

id,

[Stage 2],

Date,

Rank

FROM

Data\Stage2.qvd (QVD)

GROUP BY id;