<?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 A really basic question on selections and missing values in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/A-really-basic-question-on-selections-and-missing-values/m-p/344098#M127057</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm sure this question has come up before and I'm almost embarrassed for asking it. But it's baffling me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Suppose I have a table of companies (C1, C2, C3, C4, C5, C6) and a second table, mapping companies to head office.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;e.g.&lt;/P&gt;&lt;P&gt;Company&amp;nbsp;&amp;nbsp; Head office&lt;/P&gt;&lt;P&gt;C1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; HO1&lt;/P&gt;&lt;P&gt;C2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; HO1&lt;/P&gt;&lt;P&gt;C3&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; HO2&lt;/P&gt;&lt;P&gt;C4&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; HO1&lt;/P&gt;&lt;P&gt;C4&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; HO2&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note that a company can map to more than one head office in my example. Also, C5 and C6 have no head office.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I create a table with two columns, Company and Head office, then I'll get a nice list of the mappings, and there will be a '-' for the missing data against C5 and C6. Now, if I filter on Head office by choosing NOT HO2, then the result will only show me HO1. C5 and C6 will no longer be included because there are no associated records in the HO table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;On one hand this makes sense to me, but on the other, surely filtering NOT HO2 should also include those records for which there is no head office. Hopefully, the example attached might make more sense.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One thing I could do is create a mapping for all the companies without a head office (e.g. add C5 and C6 to the map, but call the head office "NA" or something. This would work, I'm sure, but in my live example, there are close to 100,000 rows of data and I'm reluctant to generate so many extra rows if there's a better way of doing it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this makes sense.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;James&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 09 May 2012 13:12:06 GMT</pubDate>
    <dc:creator />
    <dc:date>2012-05-09T13:12:06Z</dc:date>
    <item>
      <title>A really basic question on selections and missing values</title>
      <link>https://community.qlik.com/t5/QlikView/A-really-basic-question-on-selections-and-missing-values/m-p/344098#M127057</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm sure this question has come up before and I'm almost embarrassed for asking it. But it's baffling me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Suppose I have a table of companies (C1, C2, C3, C4, C5, C6) and a second table, mapping companies to head office.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;e.g.&lt;/P&gt;&lt;P&gt;Company&amp;nbsp;&amp;nbsp; Head office&lt;/P&gt;&lt;P&gt;C1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; HO1&lt;/P&gt;&lt;P&gt;C2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; HO1&lt;/P&gt;&lt;P&gt;C3&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; HO2&lt;/P&gt;&lt;P&gt;C4&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; HO1&lt;/P&gt;&lt;P&gt;C4&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; HO2&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note that a company can map to more than one head office in my example. Also, C5 and C6 have no head office.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I create a table with two columns, Company and Head office, then I'll get a nice list of the mappings, and there will be a '-' for the missing data against C5 and C6. Now, if I filter on Head office by choosing NOT HO2, then the result will only show me HO1. C5 and C6 will no longer be included because there are no associated records in the HO table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;On one hand this makes sense to me, but on the other, surely filtering NOT HO2 should also include those records for which there is no head office. Hopefully, the example attached might make more sense.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One thing I could do is create a mapping for all the companies without a head office (e.g. add C5 and C6 to the map, but call the head office "NA" or something. This would work, I'm sure, but in my live example, there are close to 100,000 rows of data and I'm reluctant to generate so many extra rows if there's a better way of doing it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this makes sense.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;James&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 May 2012 13:12:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/A-really-basic-question-on-selections-and-missing-values/m-p/344098#M127057</guid>
      <dc:creator />
      <dc:date>2012-05-09T13:12:06Z</dc:date>
    </item>
    <item>
      <title>Re: A really basic question on selections and missing values</title>
      <link>https://community.qlik.com/t5/QlikView/A-really-basic-question-on-selections-and-missing-values/m-p/344099#M127058</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;One way you could change this is a resident load.&amp;nbsp; That way it would use the same entries already stored in memory and map the N/A to each of the companies of your choosing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Joined:&lt;/P&gt;&lt;P&gt;LOAD * INLINE [&lt;/P&gt;&lt;P&gt;Company&lt;/P&gt;&lt;P&gt;C1&lt;/P&gt;&lt;P&gt;C2&lt;/P&gt;&lt;P&gt;C3&lt;/P&gt;&lt;P&gt;C4&lt;/P&gt;&lt;P&gt;C5&lt;/P&gt;&lt;P&gt;C6 ];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;left join&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD * INLINE [&lt;/P&gt;&lt;P&gt;Company , HeadOffice&lt;/P&gt;&lt;P&gt;C1,HO1&lt;/P&gt;&lt;P&gt;C2,HO1&lt;/P&gt;&lt;P&gt;C3,HO2&lt;/P&gt;&lt;P&gt;C4,HO1&lt;/P&gt;&lt;P&gt;C4,HO2&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MapFinal:&lt;/P&gt;&lt;P&gt;LOAD Company,&lt;/P&gt;&lt;P&gt;IF(isNull(HeadOffice), 'N/A',HeadOffice)as HeadOffice,&lt;/P&gt;&lt;P&gt;'&amp;nbsp; ' as Junk&lt;/P&gt;&lt;P&gt;Resident Joined;&lt;/P&gt;&lt;P&gt;Drop table Joined;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Attached is an example of this, even for 100,000 rows it shouldn't take that much longer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps!&lt;/P&gt;&lt;P&gt;-Brandon&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 May 2012 20:05:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/A-really-basic-question-on-selections-and-missing-values/m-p/344099#M127058</guid>
      <dc:creator />
      <dc:date>2012-05-09T20:05:55Z</dc:date>
    </item>
    <item>
      <title>A really basic question on selections and missing values</title>
      <link>https://community.qlik.com/t5/QlikView/A-really-basic-question-on-selections-and-missing-values/m-p/344100#M127059</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Great solution, thanks Brandon!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 May 2012 20:11:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/A-really-basic-question-on-selections-and-missing-values/m-p/344100#M127059</guid>
      <dc:creator />
      <dc:date>2012-05-09T20:11:26Z</dc:date>
    </item>
  </channel>
</rss>

