Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

deepanshu_chamo1
New Contributor

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

Tags (1)
1 Solution

Accepted Solutions

Re: Filter

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
3 Replies

Re: Filter

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
deepanshu_chamo1
New Contributor

Re: Filter

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

Re: Filter

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
Community Browser