Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
DS14
Partner - Contributor III
Partner - Contributor III

Generate Missing Months based on date

I have date field, from which I have to generate months which are not exists in data for the year.

For Example:

Date
01-11-2017
05-07-2018
01-08-2018
07-08-2018
01-10-2018
14-10-2018
01-12-2018
16-12-2018
01-01-2019
20-01-2019

 

Like in existing date field, December for the year 2017 and Jan,Feb,March,April,May,June and September for the year 2018 is not available. Now I have to create all those months in data.

Please suggest how I can achieve this.

Thanks in advance.

Labels (3)
5 Replies
pradosh_thakur
Master II
Master II

Month(Date(date_field,dateformat),'MMM')

Month(Date(Date,'DD-MM-YYYY'),'MMM')

 

Learning never stops.
DS14
Partner - Contributor III
Partner - Contributor III
Author

Hi Pradosh,

Thanks for  the quick response.

I am asking for creating missing months which does not exists in existing date field.

OmarBenSalem

Create a master calendar.

Please refer to this:

https://community.qlik.com/t5/QlikView-Scripting/Creating-A-Master-Calendar/td-p/341286

ps: there are at least hundred of threads discussing master calendars; u should take a look

pradosh_thakur
Master II
Master II

Oh !! Sorry I missed that . Please create a master calender for this.
Learning never stops.
siddharthsoam
Partner - Creator II
Partner - Creator II

You just need to link date field in your base with date in master calendar