<?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: Missing dates in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Missing-dates/m-p/1515727#M750098</link>
    <description>&lt;P&gt;Something like this&lt;/P&gt;&lt;PRE&gt;Table:
LOAD *,
	 Name &amp;amp; '_' &amp;amp; Date([Start date] + IterNo() - 1) as NameDateKey,
	 Date([Start date] + IterNo() - 1) as Date
While [Start date] + IterNo() - 1 &amp;lt;= [End date];
LOAD * INLINE [
    Name, Start date, End date, Type
    Yoga, 1/2/2018, 20/2/2018, Travel
    Yoga, 5/8/2018, 15/08/2018, Vacation
    Nantha, 1/1/2018, 20/8/2018, Travel
    Nantha, 9/9/2018, 12/12/2018, Vacation
];

Calendar:
LOAD Date(MinDate + IterNo() - 1) as Date
While MinDate + IterNo() - 1 &amp;lt;= MaxDate;
LOAD Min(Date) as MinDate,
	 Max(Date) as MaxDate
Resident Table;

Left Join (Calendar)
LOAD Distinct Name
Resident Table;

Concatenate (Table)
LOAD Name,
	 Date,
	 'Office' as Type
Resident Calendar
Where not Exists (NameDateKey, Name &amp;amp; '_' &amp;amp; Date);

DROP Table Calendar;

TempTable:
LOAD *,
	 If(Name = Previous(Name),
	 	If(Type = Previous(Type), Peek('Value'), RangeSum(Peek('Value'), 1)), 1) as Value
Resident Table
Order By Name, Date;

FinalTable:
LOAD Name,
	 Type,
	 Value,
	 Date(Min(Date)) as [Start date],
	 Date(Max(Date)) as [End date]
Resident TempTable
Group By Name, Type, Value;

DROP Tables Table, TempTable;&lt;/PRE&gt;</description>
    <pubDate>Mon, 03 Dec 2018 15:59:15 GMT</pubDate>
    <dc:creator>sunny_talwar</dc:creator>
    <dc:date>2018-12-03T15:59:15Z</dc:date>
    <item>
      <title>Missing dates</title>
      <link>https://community.qlik.com/t5/QlikView/Missing-dates/m-p/1515589#M750097</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a data set like shown in image 1:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Image 1" style="width: 277px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/1467i263C0DA467B64953/image-size/large?v=v2&amp;amp;px=999" role="button" title="a_date.PNG" alt="Image 1" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Image 1&lt;/span&gt;&lt;/span&gt;.&lt;/P&gt;&lt;P&gt;But I need to show the data set like missed dates for a particular person (Type: Office [Generated automatically with missed dates] )for the whole year wise as shown in image 2:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Image 2" style="width: 263px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/1469iE974329BA49C6674/image-size/large?v=v2&amp;amp;px=999" role="button" title="a_date_2.png" alt="Image 2" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Image 2&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Can any one help in this!!!!!&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Yoganantha Prakash G P&lt;/P&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Missing-dates/m-p/1515589#M750097</guid>
      <dc:creator>yoganantha321</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Missing dates</title>
      <link>https://community.qlik.com/t5/QlikView/Missing-dates/m-p/1515727#M750098</link>
      <description>&lt;P&gt;Something like this&lt;/P&gt;&lt;PRE&gt;Table:
LOAD *,
	 Name &amp;amp; '_' &amp;amp; Date([Start date] + IterNo() - 1) as NameDateKey,
	 Date([Start date] + IterNo() - 1) as Date
While [Start date] + IterNo() - 1 &amp;lt;= [End date];
LOAD * INLINE [
    Name, Start date, End date, Type
    Yoga, 1/2/2018, 20/2/2018, Travel
    Yoga, 5/8/2018, 15/08/2018, Vacation
    Nantha, 1/1/2018, 20/8/2018, Travel
    Nantha, 9/9/2018, 12/12/2018, Vacation
];

Calendar:
LOAD Date(MinDate + IterNo() - 1) as Date
While MinDate + IterNo() - 1 &amp;lt;= MaxDate;
LOAD Min(Date) as MinDate,
	 Max(Date) as MaxDate
Resident Table;

Left Join (Calendar)
LOAD Distinct Name
Resident Table;

Concatenate (Table)
LOAD Name,
	 Date,
	 'Office' as Type
Resident Calendar
Where not Exists (NameDateKey, Name &amp;amp; '_' &amp;amp; Date);

DROP Table Calendar;

TempTable:
LOAD *,
	 If(Name = Previous(Name),
	 	If(Type = Previous(Type), Peek('Value'), RangeSum(Peek('Value'), 1)), 1) as Value
Resident Table
Order By Name, Date;

FinalTable:
LOAD Name,
	 Type,
	 Value,
	 Date(Min(Date)) as [Start date],
	 Date(Max(Date)) as [End date]
Resident TempTable
Group By Name, Type, Value;

DROP Tables Table, TempTable;&lt;/PRE&gt;</description>
      <pubDate>Mon, 03 Dec 2018 15:59:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Missing-dates/m-p/1515727#M750098</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2018-12-03T15:59:15Z</dc:date>
    </item>
  </channel>
</rss>

