Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

johannay
New Contributor

How to get the desired result with variable dates for one value

Hi,

I am having a problem to get the desired result in Qlik. I have an invoice date and as well purchase order date and i have written in the script that

If("Invoice Date" -"Po Created Date"   <0, 'ATF', 'OK')           as after_the_fact_po_120

However my problem is that i might have several PO created dates, as in there has been created several POs for the same invoice and some of them have been created before and some after the invoice date. I would like the result to always be ATF if any of these PO creation dates is newer than the invoice date. How can i achieve this result?

Many thanks in advance

Johanna

1 Reply
dwforest
Valued Contributor

Re: How to get the desired result with variable dates for one value

If("Invoice Date" -Min({<Invoice ID>} "Po Created Date")   <0, 'ATF', 'OK')