Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Not applicable

Filter Date Range

Hi Friends

Is it possible to selecy date range prompt

Like

Last 1 month or last 6 months or some date range.?

Based on filter selection value my report should change.

Thanks

Govind R

6 Replies
MVP & Luminary
MVP & Luminary

Re: Filter Date Range

If you want to create a list of ranges like 'Last Month' and 'Last 6 Months' then you'll have to create a new field in the script for that.

MyTable:

LOAD

    ...some fields...,

    MyDate,

    12*(Year(Today())-Year(MyDate)) + Month(Today()) - Month(|MyDate) as MonthsAgo,

    ...some more fields...

FROM

    ...source...

    ;


MyDateRanges:

LOAD * INLINE [

MonthsAgo, DateRange

0, Current month

1, One month ago

2, Two months ago

....etc

12, Twelve months ago

1, Last three months

2, Last three months

3, Last three months

1, Last six months

2, Last six months

3, Last six months

4, Last six months

5, Last six months

6, Last six months

1, Last twelve months

2, Last twelve months

3, Last twelve months

4, Last twelve months

5, Last twelve months

6, Last twelve months

7, Last twelve months

...etc

11, Last twelve months

12, Last twelve months

];


You can then add the new field DateRange in a Filter Pane so users can select from those date ranges   


talk is cheap, supply exceeds demand
ecolomer
Honored Contributor II

Re: Filter Date Range

Yes it is possible.

You can have a list with dates and you can select by expression, par example, if you have list of days, you can write > 12/07/2016 in order to select dates in the range 13/07/2016 to 12/08/2016 (last month) ....

ecolomer
Honored Contributor II

Re: Filter Date Range

You can see this:

date range

Not applicable

Re: Filter Date Range

I am using qlik sense.Can you please give me qlik sense solution

Not applicable

Re: Filter Date Range

Hi I am new to Qlik sense.Please give me steps.

Not applicable

Re: Filter Date Range

I created script like

Load

[ACT_START_DATE],

    date([ACT_START_DATE])=today()-1  as Yesterday,

    date([ACT_START_DATE])=today()-2 as DaybeforeYesterday

......

Now how can i call this report.

Date: Yesterday or DaybeforeYesterday...... each values in drop down list.How can i achieve this.