Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

How to get a maximum value with a key field.

Hi guys,

How can I get the maximum from a duplicated key in load script.

Example:

S/NDate
1

10/10/2015

120/10/2015
215/10/2015
230/10/2015

In this case I would like to see the table below:

S/NDate
120/10/2015
230/10/2015

Is there a way of doing that?

Thanks in advance.

1 Solution

Accepted Solutions
Gysbert_Wassenaar

Use S/N as dimension and Max(Date) as expression


talk is cheap, supply exceeds demand

View solution in original post

6 Replies
Gysbert_Wassenaar

Use S/N as dimension and Max(Date) as expression


talk is cheap, supply exceeds demand
sunny_talwar

I would just use Date(Max(Date)) as expression to get a date field instead of number

Chanty4u
MVP
MVP

try,

load *,

......

max(Date)  

from table    where [sn]=1  and  [sn]=2;

Kushal_Chawda

Data:

LOAD [S/N],

          date(max(Date)) as Date

FROM Table

Group By [S/N]

Kushal_Chawda

Yes, that you can format it from Number Tab of Table

sunny_talwar

Why take some extra steps. My fingers hurt when I do that