<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Adding of missing date values in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Adding-of-missing-date-values/m-p/2052817#M86522</link>
    <description>&lt;P&gt;Hi, I think the easiest way would be to generate a calendar with all the days and add them to the existing data, so in script level you can have something like this:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;-- your SQL code --

LET vCalendarStart = Date('1.1.2023'); // Static start
LET vCalendarEnd = Date('4.1.2023');
LET vCalendarLength = Num(Date#(vCalendarEnd)) - Num(Date#(vCalendarStart)) + 1;

JOIN ([your_from_SQL_loaded_table_name])
LOAD
Date($(#vCalendarStart) + RecNo()-1) AS Date //Change 'Date' to you SQL table date field name
AutoGenerate $(#vCalendarLength);&lt;/LI-CODE&gt;
&lt;P&gt;Notice, that calendar start and end dates I entered by hand, but it can be also taken from your from SQL loaded table additionally adding:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;min_max:
LOAD
min(Date) as minDay,
max(Date) as maxDay
RESIDENT [your_from_SQL_loaded_table_name];

LET vCalendarStart = peek('minDay','[your_from_SQL_loaded_table_name]');
LET vCalendarEnd = peek('maxDay','[your_from_SQL_loaded_table_name]');&lt;/LI-CODE&gt;</description>
    <pubDate>Fri, 24 Mar 2023 07:57:01 GMT</pubDate>
    <dc:creator>justISO</dc:creator>
    <dc:date>2023-03-24T07:57:01Z</dc:date>
    <item>
      <title>Adding of missing date values</title>
      <link>https://community.qlik.com/t5/App-Development/Adding-of-missing-date-values/m-p/2052712#M86521</link>
      <description>&lt;P&gt;Good evening,&lt;/P&gt;
&lt;P&gt;I am loading data from ERP SQL database but some days are not filled. I need to create Bar Chart with every day.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Database is:&lt;/P&gt;
&lt;P&gt;1.1.2023 - 500 hour&lt;/P&gt;
&lt;P&gt;2.1.2023 - 600 hour&lt;/P&gt;
&lt;P&gt;4.1.2023 - 550 hour&lt;/P&gt;
&lt;P&gt;I need add day 3.1.2023 due to show every single day in Bar chart. So I need final database:&lt;/P&gt;
&lt;P&gt;1.1.2023 - 500 hour&lt;/P&gt;
&lt;P&gt;2.1.2023 - 600 hour&lt;/P&gt;
&lt;P&gt;3.1. 2023 - null hour&lt;/P&gt;
&lt;P&gt;4.1.2023 - 550 hour&lt;/P&gt;
&lt;P&gt;Could you give an opportunity, how can I do that ???&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you.&lt;/P&gt;
&lt;P&gt;Best Regards.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 23 Mar 2023 19:53:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Adding-of-missing-date-values/m-p/2052712#M86521</guid>
      <dc:creator>jozisvk11</dc:creator>
      <dc:date>2023-03-23T19:53:20Z</dc:date>
    </item>
    <item>
      <title>Re: Adding of missing date values</title>
      <link>https://community.qlik.com/t5/App-Development/Adding-of-missing-date-values/m-p/2052817#M86522</link>
      <description>&lt;P&gt;Hi, I think the easiest way would be to generate a calendar with all the days and add them to the existing data, so in script level you can have something like this:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;-- your SQL code --

LET vCalendarStart = Date('1.1.2023'); // Static start
LET vCalendarEnd = Date('4.1.2023');
LET vCalendarLength = Num(Date#(vCalendarEnd)) - Num(Date#(vCalendarStart)) + 1;

JOIN ([your_from_SQL_loaded_table_name])
LOAD
Date($(#vCalendarStart) + RecNo()-1) AS Date //Change 'Date' to you SQL table date field name
AutoGenerate $(#vCalendarLength);&lt;/LI-CODE&gt;
&lt;P&gt;Notice, that calendar start and end dates I entered by hand, but it can be also taken from your from SQL loaded table additionally adding:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;min_max:
LOAD
min(Date) as minDay,
max(Date) as maxDay
RESIDENT [your_from_SQL_loaded_table_name];

LET vCalendarStart = peek('minDay','[your_from_SQL_loaded_table_name]');
LET vCalendarEnd = peek('maxDay','[your_from_SQL_loaded_table_name]');&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 24 Mar 2023 07:57:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Adding-of-missing-date-values/m-p/2052817#M86522</guid>
      <dc:creator>justISO</dc:creator>
      <dc:date>2023-03-24T07:57:01Z</dc:date>
    </item>
  </channel>
</rss>

