<?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: Aggr DATA : Zero when no  record for specific field value in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Aggr-DATA-Zero-when-no-record-for-specific-field-value/m-p/2022858#M84429</link>
    <description>&lt;P&gt;Sorry! Clicked reply before I added the screenshot:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="KGalloway_0-1673041585790.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/97496iDC3FEDB2A3675162/image-size/medium?v=v2&amp;amp;px=400" role="button" title="KGalloway_0-1673041585790.png" alt="KGalloway_0-1673041585790.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 06 Jan 2023 21:46:32 GMT</pubDate>
    <dc:creator>KGalloway</dc:creator>
    <dc:date>2023-01-06T21:46:32Z</dc:date>
    <item>
      <title>Aggr DATA : Zero when no  record for specific field value</title>
      <link>https://community.qlik.com/t5/App-Development/Aggr-DATA-Zero-when-no-record-for-specific-field-value/m-p/2022630#M84405</link>
      <description>&lt;P&gt;I have the following data :&lt;/P&gt;
&lt;TABLE border="1"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="33.333333333333336%" height="25px"&gt;&lt;STRONG&gt;Item&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD width="33.333333333333336%" height="25px"&gt;&lt;STRONG&gt;Year&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD width="33.333333333333336%" height="25px"&gt;&lt;STRONG&gt;Qty&lt;/STRONG&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="33.333333333333336%" height="25px"&gt;42.1234&lt;/TD&gt;
&lt;TD width="33.333333333333336%" height="25px"&gt;2020&lt;/TD&gt;
&lt;TD width="33.333333333333336%" height="25px"&gt;10&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="33.333333333333336%" height="25px"&gt;42.1234&lt;/TD&gt;
&lt;TD width="33.333333333333336%" height="25px"&gt;2020&lt;/TD&gt;
&lt;TD width="33.333333333333336%" height="25px"&gt;20&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="33.333333333333336%" height="25px"&gt;42.1234&lt;/TD&gt;
&lt;TD width="33.333333333333336%" height="25px"&gt;2020&lt;/TD&gt;
&lt;TD width="33.333333333333336%" height="25px"&gt;30&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="33.333333333333336%" height="25px"&gt;42.1234&lt;/TD&gt;
&lt;TD width="33.333333333333336%" height="25px"&gt;2022&lt;/TD&gt;
&lt;TD width="33.333333333333336%" height="25px"&gt;40&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="33.333333333333336%" height="25px"&gt;42.1234&lt;/TD&gt;
&lt;TD width="33.333333333333336%" height="25px"&gt;2022&lt;/TD&gt;
&lt;TD width="33.333333333333336%" height="25px"&gt;50&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD height="25px"&gt;42.1234&lt;/TD&gt;
&lt;TD height="25px"&gt;2022&lt;/TD&gt;
&lt;TD height="25px"&gt;60&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And I would like get this table where all possible field values for Year are listed :&lt;BR /&gt;[Possible values for Year field are 2020, 2021, 2022]&lt;/P&gt;
&lt;TABLE border="1"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="33.333333333333336%"&gt;&lt;STRONG&gt;Item&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD width="33.333333333333336%"&gt;&lt;STRONG&gt;Year&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD width="33.333333333333336%"&gt;&lt;STRONG&gt;Total&lt;/STRONG&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="33.333333333333336%"&gt;42.1234&lt;/TD&gt;
&lt;TD width="33.333333333333336%"&gt;2020&lt;/TD&gt;
&lt;TD width="33.333333333333336%"&gt;60&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="33.333333333333336%"&gt;42.1234&lt;/TD&gt;
&lt;TD width="33.333333333333336%"&gt;2021&lt;/TD&gt;
&lt;TD width="33.333333333333336%"&gt;0&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;42.1234&lt;/TD&gt;
&lt;TD&gt;2022&lt;/TD&gt;
&lt;TD&gt;150&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&lt;BR /&gt;Note that there are no records for the Year 2021 in the database, how can I achieve this ?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I tried using the "Aggr" function, but the output does not contain any line for 2021.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Aggr(Sum(Qty), Item, Year)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;TABLE border="1"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="62.6562px" height="25px"&gt;&lt;STRONG&gt;Item&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD width="62.6562px" height="25px"&gt;&lt;STRONG&gt;Year&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD width="62.6562px" height="25px"&gt;&lt;STRONG&gt;Total&lt;/STRONG&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="62.6562px" height="25px"&gt;42.1234&lt;/TD&gt;
&lt;TD width="62.6562px" height="25px"&gt;2020&lt;/TD&gt;
&lt;TD width="62.6562px" height="25px"&gt;60&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="62.6562px" height="25px"&gt;42.1234&lt;/TD&gt;
&lt;TD width="62.6562px" height="25px"&gt;2022&lt;/TD&gt;
&lt;TD width="62.6562px" height="25px"&gt;150&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 06 Jan 2023 13:30:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Aggr-DATA-Zero-when-no-record-for-specific-field-value/m-p/2022630#M84405</guid>
      <dc:creator>Jeffx</dc:creator>
      <dc:date>2023-01-06T13:30:40Z</dc:date>
    </item>
    <item>
      <title>Re: Aggr DATA : Zero when no  record for specific field value</title>
      <link>https://community.qlik.com/t5/App-Development/Aggr-DATA-Zero-when-no-record-for-specific-field-value/m-p/2022851#M84427</link>
      <description>&lt;P&gt;If 2021 does not exist in the data, it will not appear in any aggregations.&lt;/P&gt;
&lt;P&gt;You could put in some "dummy records" for missing years (like 2021).&lt;/P&gt;
&lt;P&gt;For example:&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Item&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Year&amp;nbsp; &amp;nbsp; &amp;nbsp;Total&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;42.1234&amp;nbsp; &amp;nbsp;2020&amp;nbsp; &amp;nbsp; 10&lt;/P&gt;
&lt;P&gt;42.1234&amp;nbsp; &amp;nbsp;2021&amp;nbsp; &amp;nbsp; &amp;nbsp;-&lt;/P&gt;
&lt;P&gt;42.1234&amp;nbsp; &amp;nbsp;2022&amp;nbsp; &amp;nbsp; 40&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 06 Jan 2023 21:45:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Aggr-DATA-Zero-when-no-record-for-specific-field-value/m-p/2022851#M84427</guid>
      <dc:creator>KGalloway</dc:creator>
      <dc:date>2023-01-06T21:45:03Z</dc:date>
    </item>
    <item>
      <title>Re: Aggr DATA : Zero when no  record for specific field value</title>
      <link>https://community.qlik.com/t5/App-Development/Aggr-DATA-Zero-when-no-record-for-specific-field-value/m-p/2022858#M84429</link>
      <description>&lt;P&gt;Sorry! Clicked reply before I added the screenshot:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="KGalloway_0-1673041585790.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/97496iDC3FEDB2A3675162/image-size/medium?v=v2&amp;amp;px=400" role="button" title="KGalloway_0-1673041585790.png" alt="KGalloway_0-1673041585790.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 06 Jan 2023 21:46:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Aggr-DATA-Zero-when-no-record-for-specific-field-value/m-p/2022858#M84429</guid>
      <dc:creator>KGalloway</dc:creator>
      <dc:date>2023-01-06T21:46:32Z</dc:date>
    </item>
    <item>
      <title>Re: Aggr DATA : Zero when no  record for specific field value</title>
      <link>https://community.qlik.com/t5/App-Development/Aggr-DATA-Zero-when-no-record-for-specific-field-value/m-p/2023032#M84442</link>
      <description>&lt;P&gt;Thanks,&amp;nbsp;that's what I thought. Unfortunately I do not have access to the database, how can I add data to an existing table ?&lt;/P&gt;</description>
      <pubDate>Mon, 09 Jan 2023 08:12:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Aggr-DATA-Zero-when-no-record-for-specific-field-value/m-p/2023032#M84442</guid>
      <dc:creator>Jeffx</dc:creator>
      <dc:date>2023-01-09T08:12:32Z</dc:date>
    </item>
    <item>
      <title>Re: Aggr DATA : Zero when no  record for specific field value</title>
      <link>https://community.qlik.com/t5/App-Development/Aggr-DATA-Zero-when-no-record-for-specific-field-value/m-p/2023239#M84450</link>
      <description>&lt;P&gt;If you have access to the load script of the app, you could add it there by loading the table and then concatenating the "dummy records".&lt;/P&gt;</description>
      <pubDate>Mon, 09 Jan 2023 14:03:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Aggr-DATA-Zero-when-no-record-for-specific-field-value/m-p/2023239#M84450</guid>
      <dc:creator>KGalloway</dc:creator>
      <dc:date>2023-01-09T14:03:18Z</dc:date>
    </item>
  </channel>
</rss>

