Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
Try:
aggr( Nodistinct max(date),id)