<?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 Find missing data in latest month in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Find-missing-data-in-latest-month/m-p/1545999#M744257</link>
    <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;I want to find whether any data is missing in latest month for the 2 dimensions(Project &amp;amp; Location). I am only interested in missing data which is listed in 'Location_Map' table.&lt;/P&gt;&lt;P&gt;In my Fact table Product C with Location UK has missing data. So i want to show this in a listbox.&lt;/P&gt;&lt;P&gt;My fact table also contain a flag to identify latest records.&lt;/P&gt;&lt;P&gt;Please help how to get the missing data list.&lt;/P&gt;&lt;P&gt;//Script &amp;amp; Data&lt;/P&gt;&lt;P&gt;Location_Map:&lt;BR /&gt;Mapping&lt;BR /&gt;LOAD * INLINE [&lt;BR /&gt;Product, Location&lt;BR /&gt;A, US&lt;BR /&gt;C, UK&lt;BR /&gt;];&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Data:&lt;BR /&gt;LOAD *,&lt;BR /&gt;Date(MonthStart(Date),'MMM-YYYY') as MonthYear,&lt;BR /&gt;num(Date) as MonthNum&lt;BR /&gt;INLINE [&lt;BR /&gt;Product, Date, Margin, Sales, Location&lt;BR /&gt;A, 01/01/2017, 1184632, 4227592, US&lt;BR /&gt;A, 01/02/2017, 1273124, 4545040, US&lt;BR /&gt;A, 01/03/2017, 112483, 130487, US&lt;BR /&gt;B, 01/03/2017, 136175, 145455, UK&lt;BR /&gt;C, 01/02/2017, 11188205, 11361659, UK&lt;BR /&gt;];&lt;/P&gt;&lt;P&gt;maxMonth_map:&lt;BR /&gt;Mapping&lt;BR /&gt;LOAD max(MonthYear) as MaxMonth,&lt;BR /&gt;1 as MaxFlag&lt;BR /&gt;Resident Data;&lt;/P&gt;&lt;P&gt;Fact:&lt;BR /&gt;LOAD *,&lt;BR /&gt;ApplyMap('maxMonth_map',num(MonthYear),0) as MaxFlag&lt;BR /&gt;Resident Data;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;DROP Table Data;&lt;/P&gt;</description>
    <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
    <dc:creator>surajdhall</dc:creator>
    <dc:date>2020-11-25T16:16:04Z</dc:date>
    <item>
      <title>Find missing data in latest month</title>
      <link>https://community.qlik.com/t5/QlikView/Find-missing-data-in-latest-month/m-p/1545999#M744257</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;I want to find whether any data is missing in latest month for the 2 dimensions(Project &amp;amp; Location). I am only interested in missing data which is listed in 'Location_Map' table.&lt;/P&gt;&lt;P&gt;In my Fact table Product C with Location UK has missing data. So i want to show this in a listbox.&lt;/P&gt;&lt;P&gt;My fact table also contain a flag to identify latest records.&lt;/P&gt;&lt;P&gt;Please help how to get the missing data list.&lt;/P&gt;&lt;P&gt;//Script &amp;amp; Data&lt;/P&gt;&lt;P&gt;Location_Map:&lt;BR /&gt;Mapping&lt;BR /&gt;LOAD * INLINE [&lt;BR /&gt;Product, Location&lt;BR /&gt;A, US&lt;BR /&gt;C, UK&lt;BR /&gt;];&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Data:&lt;BR /&gt;LOAD *,&lt;BR /&gt;Date(MonthStart(Date),'MMM-YYYY') as MonthYear,&lt;BR /&gt;num(Date) as MonthNum&lt;BR /&gt;INLINE [&lt;BR /&gt;Product, Date, Margin, Sales, Location&lt;BR /&gt;A, 01/01/2017, 1184632, 4227592, US&lt;BR /&gt;A, 01/02/2017, 1273124, 4545040, US&lt;BR /&gt;A, 01/03/2017, 112483, 130487, US&lt;BR /&gt;B, 01/03/2017, 136175, 145455, UK&lt;BR /&gt;C, 01/02/2017, 11188205, 11361659, UK&lt;BR /&gt;];&lt;/P&gt;&lt;P&gt;maxMonth_map:&lt;BR /&gt;Mapping&lt;BR /&gt;LOAD max(MonthYear) as MaxMonth,&lt;BR /&gt;1 as MaxFlag&lt;BR /&gt;Resident Data;&lt;/P&gt;&lt;P&gt;Fact:&lt;BR /&gt;LOAD *,&lt;BR /&gt;ApplyMap('maxMonth_map',num(MonthYear),0) as MaxFlag&lt;BR /&gt;Resident Data;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;DROP Table Data;&lt;/P&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Find-missing-data-in-latest-month/m-p/1545999#M744257</guid>
      <dc:creator>surajdhall</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Find missing data in latest month</title>
      <link>https://community.qlik.com/t5/QlikView/Find-missing-data-in-latest-month/m-p/1546052#M744258</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I recommend you read this;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/t5/QlikView-Documents/Generating-Missing-Data-In-QlikView/ta-p/1491394" target="_blank"&gt;https://community.qlik.com/t5/QlikView-Documents/Generating-Missing-Data-In-QlikView/ta-p/1491394&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Chris.&lt;/P&gt;</description>
      <pubDate>Mon, 18 Feb 2019 20:53:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Find-missing-data-in-latest-month/m-p/1546052#M744258</guid>
      <dc:creator>chrismarlow</dc:creator>
      <dc:date>2019-02-18T20:53:29Z</dc:date>
    </item>
    <item>
      <title>Re: Find missing data in latest month</title>
      <link>https://community.qlik.com/t5/QlikView/Find-missing-data-in-latest-month/m-p/1546143#M744259</link>
      <description>&lt;P&gt;Thanks for your reply.&lt;BR /&gt;I don't want to generate missing data. I want to&amp;nbsp; map the below mapping table to only those records in fact table that has missing latest month.&lt;/P&gt;&lt;P&gt;In the example flag only the highlighted record, as it has no March data for Product A and Location UK in the mapping table.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Location_Map:&lt;BR /&gt;Mapping&lt;BR /&gt;LOAD Product &amp;amp; '|' &amp;amp; Location &amp;amp; '|' &amp;amp; 1 as Key,&lt;BR /&gt;1 as Link&lt;BR /&gt;INLINE [&lt;BR /&gt;Product, Location&lt;BR /&gt;A, US&lt;BR /&gt;C, UK&lt;BR /&gt;];&lt;/P&gt;&lt;P&gt;I have created MissingData column, but it flagging wrong records. I only want it to product C &amp;amp; Location UK row.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image1.png" style="width: 659px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/6292i55FC098D52B0ADF0/image-size/large?v=v2&amp;amp;px=999" role="button" title="image1.png" alt="image1.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Feb 2019 06:52:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Find-missing-data-in-latest-month/m-p/1546143#M744259</guid>
      <dc:creator>surajdhall</dc:creator>
      <dc:date>2019-02-19T06:52:32Z</dc:date>
    </item>
    <item>
      <title>Re: Find missing data in latest month</title>
      <link>https://community.qlik.com/t5/QlikView/Find-missing-data-in-latest-month/m-p/1546145#M744260</link>
      <description>&lt;P&gt;forgot to attach my updated app.&lt;/P&gt;</description>
      <pubDate>Tue, 19 Feb 2019 06:53:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Find-missing-data-in-latest-month/m-p/1546145#M744260</guid>
      <dc:creator>surajdhall</dc:creator>
      <dc:date>2019-02-19T06:53:35Z</dc:date>
    </item>
    <item>
      <title>Re: Find missing data in latest month</title>
      <link>https://community.qlik.com/t5/QlikView/Find-missing-data-in-latest-month/m-p/1546579#M744261</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;My bad.&lt;/P&gt;&lt;P&gt;If you want a visualisation expression you could try;&lt;/P&gt;&lt;P&gt;If(IsNull(Only({&amp;lt;Key=E({&amp;lt;MaxFlag={1}&amp;gt;} Key)&amp;gt;}Key)),0,1)&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="20190219_1.png" style="width: 508px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/6354i94096C4F034CA5F9/image-size/large?v=v2&amp;amp;px=999" role="button" title="20190219_1.png" alt="20190219_1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Or scripting you can add a left join &amp;amp; then load to a new table;&lt;/P&gt;&lt;PRE&gt;left join (Fact)
Load 
Key,
1 as FoundTemp
resident Fact
where MaxFlag=1;

Fact2:
NoConcatenate
Load
	*,
	If(IsNull(FoundTemp),1,0) AS Found
Resident Fact;


DROP Tables Data, Fact;
drop field FoundTemp;&lt;/PRE&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Chris.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Feb 2019 20:40:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Find-missing-data-in-latest-month/m-p/1546579#M744261</guid>
      <dc:creator>chrismarlow</dc:creator>
      <dc:date>2019-02-19T20:40:43Z</dc:date>
    </item>
  </channel>
</rss>

