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

How to remove duplicate

Hi

How could I remove the duplicate when I load the data?

The attachment is the sample data...

Thanks..

3 Replies
preminqlik
Specialist II
Specialist II

hi try this

LOAD Yearmonth,

     max([Percent of pass]) as [Percent],

    Grade group by Yearmonth,Grade;

    Load *

FROM

C:\Users\Piyush\Desktop\SampleData.xlsx

(ooxml, embedded labels, table is Sheet1);

Not applicable
Author

Hi

I think it could be work. But I am not sure that if I have more than 10 fields, the method could work normally?

preminqlik
Specialist II
Specialist II

yes it works

add the below line to above prceding load

max(No)           as               No

FINAL:

LOAD Yearmonth,

     max([Percent of pass]) as [Percent],

     max(No)           as               No,

    Grade group by Yearmonth,Grade;

    Load *

FROM

C:\Users\Piyush\Desktop\SampleData.xlsx

(ooxml, embedded labels, table is Sheet1);

you can also do by firstsortvalue() if you have more fields