<?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: How to handle missing fields in Connectivity &amp; Data Prep</title>
    <link>https://community.qlik.com/t5/Connectivity-Data-Prep/How-to-handle-missing-fields/m-p/2461295#M13798</link>
    <description>&lt;P&gt;You may avoid this issue by resolving the crosstable-structures which have often more disadvantages as benefits. Here is a good explanation to the idea:&amp;nbsp;&lt;A href="https://community.qlik.com/t5/Design/The-Crosstable-Load/ba-p/1468083" target="_blank"&gt;The Crosstable Load - Qlik Community - 1468083&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 11 Jun 2024 15:10:41 GMT</pubDate>
    <dc:creator>marcus_sommer</dc:creator>
    <dc:date>2024-06-11T15:10:41Z</dc:date>
    <item>
      <title>How to handle missing fields</title>
      <link>https://community.qlik.com/t5/Connectivity-Data-Prep/How-to-handle-missing-fields/m-p/2461210#M13794</link>
      <description>&lt;P&gt;Hi All&lt;BR /&gt;I have a QVD that stores surveys results that I need to create a table from. The problem is the data stored in the QVD is only kept for a rolling 2 weeks and if a survey question has not been answered within that 2 week period, the field then it is not stored in the QVD but may become available again in the future if someone answers the question. This can happen for any question/field.&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Is there a way to recognise that 1 or more fields may not be available and "force" an entry &lt;BR /&gt;EG&lt;BR /&gt;Load&lt;BR /&gt;Q1 as Q1,&lt;BR /&gt;Q2 as Q2,&lt;BR /&gt;Q3 as Q3,&lt;BR /&gt;Q4 as Q4,&lt;BR /&gt;Q5 as Q5&lt;BR /&gt;From QVD&lt;/P&gt;
&lt;P&gt;Q2 is missing so "NA" as Q2&lt;BR /&gt;Q3 is missing so "NA" as Q3&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;any help appreciated&lt;/P&gt;</description>
      <pubDate>Tue, 11 Jun 2024 11:19:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Connectivity-Data-Prep/How-to-handle-missing-fields/m-p/2461210#M13794</guid>
      <dc:creator>k_holt69</dc:creator>
      <dc:date>2024-06-11T11:19:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to handle missing fields</title>
      <link>https://community.qlik.com/t5/Connectivity-Data-Prep/How-to-handle-missing-fields/m-p/2461249#M13796</link>
      <description>&lt;P&gt;I assume you are doing "LOAD *" from the QVD as the available fields will vary. Here's a script pattern that will add the missing fields. I've simulated the QVD load with an Inline load of table "Data".&lt;/P&gt;
&lt;PRE&gt;Data: // The QVD &lt;BR /&gt;LOAD * Inline [&lt;BR /&gt;Q1, Q4, Q5&lt;BR /&gt;a, b, c&lt;BR /&gt;]&lt;BR /&gt;;&lt;BR /&gt;TempLoadedFields:&lt;BR /&gt;LOAD&lt;BR /&gt;  FieldName(RecNo(), 'Data') as Field&lt;BR /&gt;AutoGenerate NoOfFields('Data')&lt;BR /&gt;;&lt;BR /&gt;MissingFields:&lt;BR /&gt;LOAD&lt;BR /&gt;Concat('''NA'' as ' &amp;amp; ExpectedField, ', ') as Missing;&lt;BR /&gt;;&lt;BR /&gt;// The expected fields&lt;BR /&gt;LOAD * Inline [ &lt;BR /&gt;ExpectedField&lt;BR /&gt;Q1&lt;BR /&gt;Q2&lt;BR /&gt;Q3&lt;BR /&gt;Q4&lt;BR /&gt;Q5&lt;BR /&gt;]&lt;BR /&gt;Where not Exists(Field, ExpectedField)&lt;BR /&gt;;&lt;BR /&gt;Let vMissing = Peek('Missing');&lt;BR /&gt;Concatenate (Data) // Add missing fields to table&lt;BR /&gt;LOAD $(vMissing) AutoGenerate 1;  &lt;BR /&gt;Drop Table TempLoadedFields, MissingFields;&lt;/PRE&gt;
&lt;P&gt;-Rob&lt;BR /&gt;&lt;A href="http://www.easyqlik.com" target="_blank"&gt;http://www.easyqlik.com&lt;/A&gt;&lt;BR /&gt;&lt;A href="http://masterssummit.com" target="_blank"&gt;http://masterssummit.com&lt;/A&gt;&lt;BR /&gt;&lt;A href="http://qlikviewcookbook.com" target="_blank"&gt;http://qlikviewcookbook.com&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 11 Jun 2024 13:00:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Connectivity-Data-Prep/How-to-handle-missing-fields/m-p/2461249#M13796</guid>
      <dc:creator>rwunderlich</dc:creator>
      <dc:date>2024-06-11T13:00:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to handle missing fields</title>
      <link>https://community.qlik.com/t5/Connectivity-Data-Prep/How-to-handle-missing-fields/m-p/2461295#M13798</link>
      <description>&lt;P&gt;You may avoid this issue by resolving the crosstable-structures which have often more disadvantages as benefits. Here is a good explanation to the idea:&amp;nbsp;&lt;A href="https://community.qlik.com/t5/Design/The-Crosstable-Load/ba-p/1468083" target="_blank"&gt;The Crosstable Load - Qlik Community - 1468083&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 11 Jun 2024 15:10:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Connectivity-Data-Prep/How-to-handle-missing-fields/m-p/2461295#M13798</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2024-06-11T15:10:41Z</dc:date>
    </item>
  </channel>
</rss>

