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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

max date by field

Hello!

I have a problem with the aggregation and max in the set analysis.

I need the max date of each field in a set analysis

Team     Date         

A          1/01/2000         

A          1/02/2000

A          1/03/2000

B          2/01/2000

B          3/02/2000

Team     aggr(max(Date),Team) 

A          1/03/2000

B          3/02/2000

I need something that could give me the date of A and B in set analysis.

I tried with

Date(max(aggr(sum({<Team={'A'}>}Date),Team)))

But it gives me al the Dates from Team A.

Thank you!

8 Replies
johnw
Champion III
Champion III

Maybe something along these lines?

{<[Date]={"=[Date]=max({1<[Team]={'A'}>} total [Date])"}>}

sunny_talwar

How exactly are you using this if you don't mind sharing? May be there is another way to do this?

Anonymous
Not applicable
Author

Can you try with this?

{<[Date]={"=aggr(max(Date),Team)"}>}

maxgro
MVP
MVP

concat(TOTAL aggr(Date(max(Date)), Team), ',')

el_aprendiz111
Specialist
Specialist

Hi,

from script:

MAX.png

Anonymous
Not applicable
Author

I tried all the solutions but it doens´t work.

Thanks for your time!

Miguel_Angel_Baeyens

Guillermo,

Not sure if this is exactly what you are looking for:

Count items with max date

Max Date, by 1st Dimension, in Pivot

Miguel

Not applicable
Author

Hi,

Can you please try using below.

inp:

load * inline [

Team,Date        

A,1/01/2000        

A,1/02/2000

A,1/03/2000

B,2/01/2000

B,3/02/2000

];

output:

load Team, max(Date(Date,'DD/MM/YYYY')) as out

Resident inp

Group By Team

Thanks,
Sreeman