Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Filtering data from 01/07/2015 to 01/04/2016 in list box

Hi All,

I created master calendar from 2013 to 2016.

I need a list box (column name is Month) from july 2015 to April 2016.

(01/07/2015 to 01/04/2016)

  Sample data:  

CDateFiscal QuarterMonth
04/01/2013Q1April
05/01/2013Q1May
06/01/2013Q1June
07/01/2013Q2July
08/01/2013Q2Aug
09/01/2013Q2Sept
10/01/2013Q3Oct
11/01/2013Q3Nov
12/01/2013Q3Dec
02/01/2014Q4Feb
03/01/2014Q4Mar
04/01/2014Q1April
05/01/2014Q1May
06/01/2014Q1June
07/01/2014Q2July
08/01/2014Q2Aug
09/01/2014Q2Sept
10/01/2014Q3Oct
11/01/2014Q3Nov
12/01/2014Q3Dec
01/01/2015Q4Jan
02/01/2015Q4Feb
03/01/2015Q4Mar
04/01/2015Q1April

Thanks,

Krishna

1 Solution

Accepted Solutions
kkkumar82
Specialist III
Specialist III

Create a list in the list box and goto the "expression" option which you can see last in the fields.

Write the expression as

I need Empid in a list box from 01/07/2015 to today  only

     if(datefield>=date(date#('01/07/2015','DD/MM/YYYY')) and datefield<=today(), EMPID)


Empid in a list box from 01/01/2013 to 01/07/2015  only

  if(datefield>=date(date#('01/01/2013','DD/MM/YYYY')) and datefield<=date(date#('01/07/2015','DD/MM/YYYY')), EMPID)


Month in a list box from 01/07/2015 to today only

if(datefield>=date(date#('01/07/2015','DD/MM/YYYY')) and datefield<=today(), Month)


Hope it helps




View solution in original post

10 Replies
Chanty4u
MVP
MVP

avinashelite

Try like this:

If(CDate>=''01/07/2015' and CDate<=' 01/04/2016',CDate)

or

you could push the values into variables and then you can use the same

vStart=01/07/2015

vEnd=01/04/2016

If(CDate>=vStart and CDate<=vEnd,CDate)

Anonymous
Not applicable
Author

Hi ,

Comm:

LOAD CDate,

     [Fiscal Quarter],

     Month,

     Month(CDate)&Year(CDate) as NewMonth

FROM

(txt, codepage is 1252, embedded labels, delimiter is '\t', msq)

Where Date(CDate)>='01/07/2015' and Date(CDate)<='01/04/2016';

ankit777
Specialist
Specialist

Hi

you want a list box showing dates from  july 2015 to April 2016.(01/07/2015 to 01/04/2016)

or

you want to select these date range by clicking on some button?

Anonymous
Not applicable
Author

Hi,

  I"m looking filter data in list box by range of dates.

I need Empid in a list box from 01/07/2015 to today  only,

Empid in a list box from 01/01/2013 to 01/07/2015  only

and Month in a list box from 01/07/2015 to today only.

Thanks,

Krishna

kkkumar82
Specialist III
Specialist III

Create a list in the list box and goto the "expression" option which you can see last in the fields.

Write the expression as

I need Empid in a list box from 01/07/2015 to today  only

     if(datefield>=date(date#('01/07/2015','DD/MM/YYYY')) and datefield<=today(), EMPID)


Empid in a list box from 01/01/2013 to 01/07/2015  only

  if(datefield>=date(date#('01/01/2013','DD/MM/YYYY')) and datefield<=date(date#('01/07/2015','DD/MM/YYYY')), EMPID)


Month in a list box from 01/07/2015 to today only

if(datefield>=date(date#('01/07/2015','DD/MM/YYYY')) and datefield<=today(), Month)


Hope it helps




ankit777
Specialist
Specialist

Hi

Try using calculated fields then

Make a new list box and add expression to it:

1)

=if(CDate>'01/07/2015' and CDate<today(),Empid)

2)

=if(CDate>'01/01/2013' and CDate<'01/07/2015',Empid)

3)

=if(CDate>'01/07/2015' and CDate<today(),month(CDate))

avinashelite

try with the If condition

If(CDate>=''01/07/2015' and CDate<=' 01/04/2016',required_field)

kkkumar82
Specialist III
Specialist III

Can you also update ur data by adding EMPID so that I would be perfect for giving a sample for you