How to show all days of the month in line chart of Qlikview?




I have day wise sales numbers but on some of the days we do not have any sales (on Holiday and Weekends). Now whenever, I plot chart for day wise sales, non-sales days is not available in chart. Can we have any methodology to reflect these non-sales days in chart.



Hi Mark,

Firstly I got this code from google only. You can follow the steps :-

  1. You can get the calendar from which ever period you wish to as in this below syntax I have given the period from 01 Jan 2012. This entire code will autocreate the calendar from that period.
  2. Calendar is created with the name MasterCalendar
  3. Import mastercalendar for joining tables
  4. Use the orderdate to merge with the dates
  5. Now you can use this date as a dimension and get the missing values in the chart
  6. The syntax is :-

LET vMinDate=Num(‘2012-01-01’);
LET vMaxDate=Num(today());

date((vMinDate)+rowno()-1,'YYYY-MM-DD') As TempDate AUTOGENERATE (vMaxDate)-$(vMinDate);

TempDate As OrderDate,
Week(TempDate) As Week,
Year(TempDate) As Year,
Month(TempDate) As Month,
WeekDay(TempDate) as Weekday,
day(TempDate) as Day
resident TempCalendar;
STORE MasterCalendar INTO [D:\CalendarFinal.qvd];

Hope this helps