Skip to main content
Announcements
See why Qlik is a Leader in the 2024 Gartner® Magic Quadrant™ for Analytics & BI Platforms. Download Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Comparaison de date

Bonjour,

Je souhaite, d'après un fichier contenant des N° de BL et des dates de livraisons, lister les commandes entre deux dates

(Ex : du 01/09/2013 au 03/09/2013 soit 10 BL dans cet intervalle)

J’ai donc extrait les dates dans deux tables séparées (dateDebut et dateFin) pour créer un calendrier ou l'on sélectionne les dates
de début et de fin. (Je souhaite avoir deux objets sur mon interface, et non un seul où je sélectionne une plage de date)

 

J'ai ensuite essayé d'ajouter une dimension calculée dans le tableau avec un test pour savoir si mon enregistrement se trouve dans l'intervalle :

if(dateDebut >= dateLivraison and dateFin<= dateLivraison,NOBL,Null())

 

Cependant, je rencontre des problèmes de performances, et QV crash avant que je puisse constater un résultat.

Je ne parviens pas à trouver la bonne syntaxe en set-analysis ce qui pourrait arranger mon problème.

Le calcul dans le script ne conviens pas car je dois pouvoir modifier les dates.

Quelqu'un aurait une solution à mon problème ? Même une autre solution, c'est le résultat qui compte

D'avance merci

1 Solution

Accepted Solutions
DavidFoster1
Specialist
Specialist

Hi Thomas

My French is very bad so I will not try to respond in French.

If I understood correctly you are trying to filter a date between a start and end.

The option we use for that is to have 2 calendar objects set to populate variables and then apply a filter expression to the target date.

The expression would be something like ='>=' & $(vStartDate) & ' <= ' &$(vEndDate)

View solution in original post

4 Replies
DavidFoster1
Specialist
Specialist

Hi Thomas

My French is very bad so I will not try to respond in French.

If I understood correctly you are trying to filter a date between a start and end.

The option we use for that is to have 2 calendar objects set to populate variables and then apply a filter expression to the target date.

The expression would be something like ='>=' & $(vStartDate) & ' <= ' &$(vEndDate)

Not applicable
Author

Hello David,

Thank to your response,

I try this

Regards

Not applicable
Author

It seems to work,

Thank you very muchDavid

DavidFoster1
Specialist
Specialist

No problem.

Please can you mark my response as correct?