Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello.
I would like to get max Date for each Company in 3 months period.
E.g. company A starting date is 28.11.2019. This is a min Date and I want to find max Date for company A up to 28.01.2020.
In my case it is 13.01.2020. And then I want to replace earlier dates for that company with 13.01.2020. How can I do that?
Thanks.
Original table:
| ID | Date | Company | Value |
| 1 | 28.11.2019 | A | 12 |
| 2 | 29.11.2019 | A | 56 |
| 3 | 29.11.2019 | A | 31 |
| 4 | 08.12.2019 | A | 23 |
| 5 | 13.01.2020 | A | 24 |
| 6 | 24.05.2020 | A | 21 |
| 7 | 28.11.2019 | B | 32 |
| 8 | 02.12.2019 | B | 22 |
Expected result:
| ID | Date | Company | Value |
| 1 | 13.01.2020 | A | 12 |
| 2 | 13.01.2020 | A | 56 |
| 3 | 13.01.2020 | A | 31 |
| 4 | 13.01.2020 | A | 23 |
| 5 | 13.01.2020 | A | 24 |
| 6 | 24.05.2020 | A | 21 |
| 7 | 02.12.2019 | B | 32 |
| 8 | 02.12.2019 | B | 22 |
LOAD * Inline [
ID, Date, Company, Value
1, 28.11.2019, A, 12
2, 29.11.2019, A, 56
3, 29.11.2019, A, 31
4, 08.12.2019, A, 23
5, 13.01.2020, A, 24
6, 24.05.2020, A, 21
7, 28.11.2019, B, 32
8, 02.12.2019, B, 22
];
@sunny_talwar Thanks a lot, Sunny! Works like a charm.