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

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Load only rows with min value

Hi guys,

I'm trying to load "min values" from a table. I have redundant rows but I want only the row's which have the min Amount.

Example:

  ID, Amount

    1, 5

    1, 2

    2, 3

    2, 8

    3, 9

In this Example I want only back...

1,2

2,3

3,9

But I don't know to handle this.

Thank you

Labels (1)
20 Replies
Kushal_Chawda
MVP
MVP

Data:

LOAD

ID

DateOne

SETDate

DateTwo,

floor(DateTwo)- floor(DateOne) as Diff,

Amount

FROM table;

New:

LOAD ID,

           DateOne,

           FirstSortedValue(DateTwo,Diff) as DateTwo,

          Firstsortedvalue(Amount,Diff) as Amount

Resident Data

group by ID,DateOne;

drop table Data;