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

Announcements
Q&A with Qlik - Qlik Cloud Migration: Questions about migrating to Qlik Cloud? Catch the latest replay!
cancel
Showing results for 
Search instead for 
Did you mean: 
Jack4
Contributor II
Contributor II

Max date for period

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:

IDDateCompanyValue
128.11.2019A12
229.11.2019A56
329.11.2019A31
408.12.2019A23
513.01.2020A24
624.05.2020A21
728.11.2019B32
802.12.2019B22

 

Expected result:

IDDateCompanyValue
113.01.2020A12
213.01.2020A56
313.01.2020A31
413.01.2020A23
513.01.2020A24
624.05.2020A21
702.12.2019B32
802.12.2019B22

 

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
];

Labels (1)
10 Replies
Jack4
Contributor II
Contributor II
Author

@sunny_talwar Thanks a lot, Sunny! Works like a charm.