Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Coming your way, the Qlik Data Revolution Virtual Summit. October 27-29. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Specialist II
Specialist II

Date Selections

     I have a dates like 1/31/2010,1/31/2011,1/31/2012,1/31/2013 (M/DD/YYY)

.I created chart above date as dimension ,So here if selected date 1/31/2012 in chart showing only 1/31/2012 I  pervious dates will be diappered .  I want to be presented previous dates as well I will appricate any one heelp me.

16 Replies
Highlighted
MVP
MVP

Can you upload your sample apps?

Update :

You can use like below

SUM({$<Date = >}Sales)

Highlighted
Not applicable

Hi,

If you are using any aggregated funciton in your chart expression then try to use {<Datefield=>} in SET expression.

Highlighted
Specialist II
Specialist II

Hi Manish

This sceniro works only actual data in database but some dates are dynamically created what to do so.

Highlighted
MVP
MVP

Better if you share your sample file !

Would love to help you.

Highlighted
Partner
Partner

Try this :

sum( {$<Date={'<=$(=Date)'}>}...)

Highlighted
Specialist II
Specialist II

Please see below screen shot  .

i used below script for dynamically created dates and want to be create DateId  for this so i can use in my experssion  as u said.

or any other idea?

set DateFromat='M/D/YYYY';

set vMaxdate=date(today());

Let vStart = date('12/31/2012');

Let vEnd = date('12/31/2014');

LOAD MonthEnd(date) as MonthEndDate;

LOAD Date('$(vStart)' + RecNo()) as MonthEndDate autogenerate '$(vEnd)' - '$(vStart)' ; 

Highlighted
MVP
MVP

You can create something like below...

Let vStart = NUM(Date('31/12/2012'));

Let vEnd = NUM(Date('31/12/2014'));

TempDate:

Load

  Date($(vStart) + RowNo() - 1) as Temp_Date

AutoGenerate $(vEnd) - $(vStart)+1;

Load AutoNumber(Temp_Date) as DateID,

  Temp_Date as Date

Resident TempDate

Order By Temp_Date;

Drop Table TempDate

Highlighted
Specialist II
Specialist II

Getting Script error

Highlighted

SET DateFormat='DD/MM/YYYY';

Let vStart = NUM(Date('31/12/2012'));

Let vEnd = NUM(Date('31/12/2014'));

TempDate:

Load

  Date($(vStart) + RowNo() - 1) as Temp_Date

AutoGenerate $(vEnd) - $(vStart)+1;

Load AutoNumber(Temp_Date) as DateID,

  Temp_Date as Date

Resident TempDate

Order By Temp_Date;

Drop Table TempDate;