Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Mainfelder
Contributor
Contributor

Filter Table by Date in Expression Editor

Hello Guys,

unfortunately i have a problem which i cant solve for weeks.

I have 3 columns in my table: PrNum, StartDate and Enddate. I just want to filter the data in the express editor not in the script like in the following:

 

Example Data:

PrNum,StartDate,EndDate

1,10.10.2020,11,12,2020

2,05.05.2020,09.09.2020

 

I want to say in the express editor or on the analyze site, that when i enter a date like 30.10.2020 then it would be a date between the fields StartDate and EndDate of row 1. Result in the sheet should be obviously this then:

 1,10.10.2020,11,12,2020

 

Can you please explain how i can do it. I tried many expression but none of them worked and would be very happy if some could explain it to me. If its possible where to put the expression. I always put the expression in the expression editor from column PrNum

Thank you in advance!

 

 

2 Replies
eddie_wagt
Partner - Creator III
Partner - Creator III

This depends on how your datamodel looks like, especially how your calendar links to the tables. And it depends what you mean by 'entering a date'. Without the datamodel as example (qvf) it is hard to give you a good advice. However my best advice I can give, solve it in the script and not in the front-end. 

Mainfelder
Contributor
Contributor
Author

Thank you for your answer MR.wagt 🙂

Unfortunatly i cant post the datamodel because it contains sensible data, but i solved it in the script already with this code:

Where Date(Startdatum,'MM/DD/YYYY') <= Date($(TestDatum),'MM/DD/YYYY') and Date($(TestDatum),'MM/DD/YYYY') <= Date(Enddatum,'MM/DD/YYYY');

now i want this in the Front-End because its take 2 minutes in the script to run the data and when i want to change the date (TestDatum) then i have to run to script again. So if there is a solution to my problem in the front-end, then i would be very happy.