Skip to main content
Announcements
Do More with Qlik - Qlik Cloud Analytics Recap and Getting Started, June 19: REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
sunilkumarqv
Specialist II
Specialist II

Its tricky date reqiurment

set DateFormat='M/D/YYYY';

Let vStart =  Date('4/30/2010') ;

Let vEnd = Date('1/31/2014');

MonthCal:

Load Date(Date-1) as Date ,RowNo() AS  DateID;

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

from above script i have created a dynamic dates and using RowNo() as DateID defined id for dates ,So here I want monthEnd dates that is also fine I created MonthEnd(Date ) it list out only MonthEnd Dates .I Want That Month End Date Ids to be Created Can any help me out  .

1 Solution

Accepted Solutions
Gysbert_Wassenaar

MonthCal:

Load

Date(Date-1) as Date ,RowNo() AS  DateID ,

Autonumber(monthend(Date-1)) as MonthEndID;

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


talk is cheap, supply exceeds demand

View solution in original post

5 Replies
Gysbert_Wassenaar

MonthCal:

Load

Date(Date-1) as Date ,RowNo() AS  DateID ,

Autonumber(monthend(Date-1)) as MonthEndID;

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


talk is cheap, supply exceeds demand
sunilkumarqv
Specialist II
Specialist II
Author

No Syntax error Autonumber(monthend(Date-1)) as MonthEndID;

Not applicable

The answer by Gysbert Wassenaar is correct

Add just a comma (,) after DateID (surely due to a bad copy/paste)

Fabrice

Not applicable

Hi,

ADD comma ',' instead of semicolun ';' next to MonthEndID.


sunilkumarqv
Specialist II
Specialist II
Author

thanks a  lot Gysbert  its working but still i need to do some work fo finish it.

In chart i taken  MonthEnd(Date) as Dimension  so if i select a year 2011 its shows only that value .i want to be show previous year as well up to April 2010 in same way all years its possible or any other valuable solutions Please share these as soon as possible.