Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Filter

Please help me in this scenario

I have “CreatedDate” column in the data set i.e. 2014-02-04 09:40:00.000000, 2014-02-04 09:50:00.000000, 2014-02-04

16:40:00.000000 and so on.  I want to filter in the CreatedDate > 2015-01-01 in the script

Please help

Thanks

Deepanshu Chamoli

1 Solution

Accepted Solutions
Gysbert_Wassenaar

In general you use a WHERE clause to filter data when loading data in a new table:

MyTable

LOAD

     FieldA,

     FieldB,

     CreatedDate,

     ...other fields

FROM

     MySource

WHERE

     CreatedDate > makedate(2015)

     ;

Whether that works or not depends on the contents of the CreatedDate field. If it contains text strings then it won't work. If it contains date values (i.e. numbers) then it will work.


talk is cheap, supply exceeds demand

View solution in original post

3 Replies
Gysbert_Wassenaar

In general you use a WHERE clause to filter data when loading data in a new table:

MyTable

LOAD

     FieldA,

     FieldB,

     CreatedDate,

     ...other fields

FROM

     MySource

WHERE

     CreatedDate > makedate(2015)

     ;

Whether that works or not depends on the contents of the CreatedDate field. If it contains text strings then it won't work. If it contains date values (i.e. numbers) then it will work.


talk is cheap, supply exceeds demand
Anonymous
Not applicable
Author

Thanks a lot for reply

The date is in number values. Please find the attached sanpshot.

The Date is in date time format which includes the data from 2010 to 2015.

I have used the MONTHNAME("DATE") function to convert it in to the Months.

Question is I want to filter the dates greater than 2015 in the table only. If I used in the script it leads to filter out in every chart and table

Please let me know if it is making sense

Thanks

Deepanshu

Gysbert_Wassenaar

First create a bookmark for the selection of the dates or months that you want to see in the chart. Then change the expressions in your chart to make use of the bookmark. For example Sum(Amount) becomes Sum({BookMarkNameHere}Amount). Replace BookMarkNameHere with the name of the bookmark you created.


talk is cheap, supply exceeds demand