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

Announcements
Independent validation for trusted, AI-ready data integration. See why IDC named Qlik a Leader: Read the Excerpt!
cancel
Showing results for 
Search instead for 
Did you mean: 
aminehaddar
Contributor II
Contributor II

use date in interval with join

Hello the community,

I have 3 files.

affectation:

LOAD

[Code Agence] as CodeAgence,

Date as Date_Im

FROM

[...\affec.xlsx]

(ooxml, embedded labels, table is Feuil1);

x:

left join(affect)

LOAD

     ATE_NUM as NUMD,

     code as CodeAgence,

     _NAME,

FROM

[.../x.xlsx]

(ooxml, embedded labels, table is [Exporter la feuille de calcul]);

daily:

LOAD

     ID as NUMD

     DAY,  

     [NBR],

     [MNT],

FROM

[/journalier.xlsx]

(ooxml, embedded labels, table is [Exporter la feuille de calcul]);

doc:

LOAD  

CodeAgence,

Interval('31/12/2017'-Date_Im,'d') as Nbre_jours

resident affectation;

z:

left join(doc)

LOAD

//////////////////////////////////////////////// if(date(date#([DAY],'DD/MM/YYYY'), 'DD/MM/YYYY')>= Date_Im, '1','0')  as flag

//////////////////////////////////////////////// count('1') as Nbre_oper_after,

resident daily;

*********

The Date_Im exists in 'affect' so as I did, qlik can't see Date_Im. what should I do to overcome this matter?

My second question is about counting the '1' and '0', should I write like this

load * from z where flag=1 ;

Regards,

0 Replies