Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Need help with Dates

Hello,

I cant get my head round a small problem. say if I have two columns with Dates in as follows.

PRINT DATE     PAYMENT DATE

01.01.12            03.05.12

                        07.05.12

                        11.05.12

I only want to load the payment date that comes first after the print date, only if it occurs between a minimum of 0 and maximum 15 days after this date.

how do I do this?

2 Replies
Not applicable
Author

Anyone???

jeffmartins
Partner - Creator II
Partner - Creator II

Hi mrpjspencer,

You can load your table as follow:

Table:

LOAD [PRINT DATE],

          FirstValue([PAYMENT DATE]) as [PAYMENT DATE]

FROM [.\test.xlsx]

(ooxml, embedded labels, table is Plan1)

Where [PAYMENT DATE] - [PRINT DATE] <= 15

group by [PRINT DATE];

I assumed the data are sorted by the fields [PRINT DATE] and [PAYMENT DATE].

See the attached file. Hope this helps you.

Regards