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

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Date generate in table

I have two dates StartDate and EndDate, when I select those dates I have to generate all the dates between them.......tnx

5 Replies
chematos
Specialist II
Specialist II

let vStartYear = Year(StartDate);

Dates:

load date( makedate($(vStartYear))+rowno()-1) as Date

AutoGenerate( today()-makedate($(vStartYear))) ;

Hope this helps

Not applicable
Author

Thanks for the reply,

I want in the front end, UI side.......I have two date fields.......and if I select those dates I should able to populate all the dates between those selections......

chematos
Specialist II
Specialist II

you will need a date field with all dates, and you can use a calculated dimension using that date like this:

if(Date <=StartDate and Date >= EndDate, Date)

Not applicable
Author

please find the attached sample pics...I have two date fields with selections.....and the other one is table with all the dates......

chematos
Specialist II
Specialist II

Do you have a calendar? You need a calendar or a Date field linked with your date field of your fact table, the date field you are going to use in your chart.

You must have a table with this fields and more: Date, Sales or whatever you're measuring in your chart.

StartDate and EndDate could be variables, better than fields.

And you should have a Calendar that contains all your possible dates with a few fileds or more: Date, Year, Month, Week, etc.

Do you understand??