Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
khaoula_agazzar01
Contributor
Contributor

aggr(max(date),id)

hello guys,

i have a problem in my formula aggr(max(date),id).

Here's a sample of data:

id date
id1 12/01/2021
id1 13/01/2021
id1 14/01/2021
id2 13/01/2021
id2 16/01/2021

 

Here's the results that i look for:

id date max
id1 12/01/2021 14/01/2021
id1 13/01/2021 14/01/2021
id1 14/01/2021 14/01/2021
id2 13/01/2021 16/01/2021
id2 16/01/2021 16/01/2021

 

but when i use aggr(max(date),id), the result is affected in one line like this:

id date max
id1 12/01/2021 14/01/2021
id1 13/01/2021 -
id1 14/01/2021 -
id2 13/01/2021 16/01/2021
id2 16/01/2021 -

 

any help please?

 

thanks

 

1 Solution

Accepted Solutions
tresesco
MVP
MVP

Try:

aggr( Nodistinct max(date),id)

View solution in original post

1 Reply
tresesco
MVP
MVP

Try:

aggr( Nodistinct max(date),id)