Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I only want to count the test_id's when the interventiondate is later in time then the datetime.
The expression below I used doesn't work:
count(distinct {<interventiondate={">datetime"} >} test_id)
How do I write this?
Kind regards,
Katleen
Works in the example file, but when I insert it into my original script I get the error that the field 'interventiondate' can't be found.
Acties_totaal:
load *,
if(interventiondate>=process_datetime,1,0) as IntDateBiggerThanDateTimeFlag;
LOAD _id as test_id,
_address_id as addresses_id,
action_category,
actionname,
status as acties_totaal_status,
interventiondate as acties_totaal_interventiondate,
process_datetime as acties_totaal_datetime
FROM
[..\2. Extraction to QVD layer\QVD_Ettenleur\Actions_69.qvd]
(qvd);
Can you see what is wrong with my script?
Yes. This is because we are essentially doing TWO loads. The top one is a load FROM the bottom one. So since you change the name of the field interventiondate, it no longer exists in the top load.
change to:
load *,
if(acties_totaal_interventiondate>=acties_totaal_datetime,1,0) as IntDateBiggerThanDateTimeFlag;
LOAD _id as test_id,
_address_id as addresses_id,
action_category,
actionname,
status as acties_totaal_status,
interventiondate as acties_totaal_interventiondate,
process_datetime as acties_totaal_datetime
FROM
[..\2. Extraction to QVD layer\QVD_Ettenleur\Actions_69.qvd]
(qvd);