Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
abhaysingh
Specialist II
Specialist II

FromDate and ToDate Calendar From Backend

Hi All,

Can any one suggest how to make FromDate and ToDate Calendar From Backend..

i have one scenario in which user need to select from_Date and To_Date and Data should be shown In-between  them.

Exactly like the calendar object available in qlikview.

i don't want to do it from front end..

Please Advice..

Regards

Abhay

3 Replies
hic
Former Employee
Former Employee

You can do this by using two AsOf-tables in your data model; one pointing forwards in time, one pointing backwards.

See the following links for more on AsOf tables:

Calculating rolling n-period totals, averages or other aggregations

QlikView Blog Q-Tip #4 How to Use "As of Date" table | Natural Synergies

HIC

abhaysingh
Specialist II
Specialist II
Author

Hi Henric,

Do you have any Sample file for same?

Thanks

Abhay

hic
Former Employee
Former Employee

You can use the following snippet as a template for a solution:

Calendar:
Load
Year(Date) as Year,
Month(Date) as month,
Date(MonthStart(Date),'YYYY-MM') as Month,
*;
Load Date(MakeDate(2015) -1 + RecNo()) as Date
Autogenerate 365 ;

StartDate:
Load * Where Date >= StartDate;
Load Date,
Date(MakeDate(2015) -1 + IterNo()) as StartDate
Resident Calendar While IterNo() <= 365 ;

EndDate:
Load * Where Date <= EndDate;
Load Date,
Date(MakeDate(2015) -1 + IterNo()) as EndDate
Resident Calendar While IterNo() <= 365 ;

HIC