Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Highlighted
Not applicable

[HELP!] Display a date between two dates

Hello,

here is my relationnal model, "Début de validité" and "fin de période de validité" are two dates. I want, in a list of selection, get all the dates between "Début de validité" and "fin de période de validité" by selecting from "Année1" a year and "Mois1" a month. "Année1" and "Mois1" must be included between "Début de validité" and "fin de période de validité". "Année1" and "Mois1" are separated in there list of selection. How to do this ? May i have to change my relationnal model ? I think i don't because to get only the values of année1 and mois1 included between "Début de validité" and "fin de période de validité", theres tables musn't be connected.

Capture10.PNG

Thanks in advance four yours answers.

1 Solution

Accepted Solutions
Not applicable

Re: [HELP!] Display a date between two dates

For all people who need, this syntax work, i need to create another table to have all my values available

EventLog:
LOAD
Year([Début de validité])  as [SAnnée],
Month([Début de validité]) as [SMois],
MakeDate(Year([Début de validité]),Month([Début de validité])) as YMD
FROM [\\Srvfich\usrjfa\AHolzhammer\24-04-2017\Fichiers sources\Regroup.qvd](qvd);

//[N° Doc. Article] pour relier à la table ERP, relation 1 - 1
OrderLog:
LOAD [N° Doc. Article],[Début de validité], [Fin de la période de validité] FROM [\\Srvfich\usrjfa\AHolzhammer\24-04-2017\Fichiers sources\Regroup.qvd](qvd);

Inner Join IntervalMatch ( YMD )
LOAD [Début de validité], [Fin de la période de validité]
Resident OrderLog;

5 Replies
MindaugasBacius
Valued Contributor III

Re: [HELP!] Display a date between two dates

I think you need here IntervalMatch.

Not applicable

Re: [HELP!] Display a date between two dates

i have already look for intervalmatch, i think they can't be used here

Not applicable

Re: [HELP!] Display a date between two dates

Yes, i have find some exemples for my case. But i you have any suggestions...

Not applicable

Re: [HELP!] Display a date between two dates

I am trying this :

[Intervals]:
LOAD * FROM [\\Srvfich\usrjfa\AHolzhammer\24-04-2017\Fichiers sources\Regroup.qvd](qvd);

[Events]:
LOAD
Year([Début de validité]) as [SAnnée],
Month([Début de validité]) as [SMois],
MakeDate(Year([Début de validité]),Num(Month([Début de validité]),Day(01))) as YMD
FROM [\\Srvfich\usrjfa\AHolzhammer\24-04-2017\Fichiers sources\Regroup.qvd](qvd);

IntervalMatch:
IntervalMatch (YMD)
Load distinct [Début de validité] as DV, [Fin de la période de validité] as FV resident [Intervals];

but it doesn't work, intervalMatch isn't connected to Intervals

Not applicable

Re: [HELP!] Display a date between two dates

For all people who need, this syntax work, i need to create another table to have all my values available

EventLog:
LOAD
Year([Début de validité])  as [SAnnée],
Month([Début de validité]) as [SMois],
MakeDate(Year([Début de validité]),Month([Début de validité])) as YMD
FROM [\\Srvfich\usrjfa\AHolzhammer\24-04-2017\Fichiers sources\Regroup.qvd](qvd);

//[N° Doc. Article] pour relier à la table ERP, relation 1 - 1
OrderLog:
LOAD [N° Doc. Article],[Début de validité], [Fin de la période de validité] FROM [\\Srvfich\usrjfa\AHolzhammer\24-04-2017\Fichiers sources\Regroup.qvd](qvd);

Inner Join IntervalMatch ( YMD )
LOAD [Début de validité], [Fin de la période de validité]
Resident OrderLog;