<?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: Show zero for no records in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Show-zero-for-no-records/m-p/1969574#M79997</link>
    <description>&lt;P&gt;You could try either of the following - the former ignores all selections and the latter only on specific field(s). Note that "Include zero values" must be checked under Data Handling.&lt;/P&gt;
&lt;P&gt;Sum(Sales)+Sum({1} 0)&lt;/P&gt;
&lt;P&gt;Sum(Sales)+Sum({&amp;lt; Month= , Product=&amp;gt;} 0)&lt;/P&gt;</description>
    <pubDate>Wed, 17 Aug 2022 09:10:35 GMT</pubDate>
    <dc:creator>Or</dc:creator>
    <dc:date>2022-08-17T09:10:35Z</dc:date>
    <item>
      <title>Show zero for no records</title>
      <link>https://community.qlik.com/t5/App-Development/Show-zero-for-no-records/m-p/1969549#M79996</link>
      <description>&lt;P&gt;I'm preparing a presentation for the performance of our sales people. For example, I needed a number of tables (for different products) that show a list of our sales-people and what they sold in the last 6 months.&lt;/P&gt;
&lt;P&gt;The result should look like so:&lt;/P&gt;
&lt;TABLE style="border-collapse: collapse; width: 186pt;" border="0" width="249" cellspacing="0" cellpadding="0"&gt;
&lt;TBODY&gt;
&lt;TR style="height: 13.2pt;"&gt;
&lt;TD width="83" height="18" style="height: 13.2pt; width: 62pt;"&gt;Sales person&lt;/TD&gt;
&lt;TD width="83" style="width: 62pt;"&gt;Product&lt;/TD&gt;
&lt;TD width="83" style="width: 62pt;"&gt;Sales&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 13.2pt;"&gt;
&lt;TD height="18" style="height: 13.2pt;"&gt;Peter&lt;/TD&gt;
&lt;TD&gt;A&lt;/TD&gt;
&lt;TD align="right"&gt;100&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 13.2pt;"&gt;
&lt;TD height="18" style="height: 13.2pt;"&gt;Karl&lt;/TD&gt;
&lt;TD&gt;B&lt;/TD&gt;
&lt;TD align="right"&gt;10&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 13.2pt;"&gt;
&lt;TD height="18" style="height: 13.2pt;"&gt;Susan&lt;/TD&gt;
&lt;TD&gt;A&lt;/TD&gt;
&lt;TD align="right"&gt;200&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 13.2pt;"&gt;
&lt;TD height="18" style="height: 13.2pt;"&gt;Martin&lt;/TD&gt;
&lt;TD&gt;C&lt;/TD&gt;
&lt;TD align="right"&gt;0&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But when I filter the timeframe and the product, all sales people with zero sales disappear in the table&lt;/P&gt;
&lt;TABLE style="border-collapse: collapse; width: 186pt;" border="0" width="249" cellspacing="0" cellpadding="0"&gt;
&lt;TBODY&gt;
&lt;TR style="height: 13.2pt;"&gt;
&lt;TD width="83" height="18" style="height: 13.2pt; width: 62pt;"&gt;Sales person&lt;/TD&gt;
&lt;TD width="83" style="width: 62pt;"&gt;Product&lt;/TD&gt;
&lt;TD width="83" style="width: 62pt;"&gt;Sales&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 13.2pt;"&gt;
&lt;TD height="18" style="height: 13.2pt;"&gt;Peter&lt;/TD&gt;
&lt;TD&gt;A&lt;/TD&gt;
&lt;TD align="right"&gt;100&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 13.2pt;"&gt;
&lt;TD height="18" style="height: 13.2pt;"&gt;Karl&lt;/TD&gt;
&lt;TD&gt;B&lt;/TD&gt;
&lt;TD align="right"&gt;10&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 13.2pt;"&gt;
&lt;TD height="18" style="height: 13.2pt;"&gt;Susan&lt;/TD&gt;
&lt;TD&gt;A&lt;/TD&gt;
&lt;TD align="right"&gt;200&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;(Martin disappeared because he has no sales records in the selection)&lt;/P&gt;
&lt;P&gt;I basically need all 4 sales people to always show up in the table even if the selections return no records and zero for sales in those cases.&lt;/P&gt;
&lt;P&gt;Anybody know how this can be achieved?&lt;/P&gt;</description>
      <pubDate>Wed, 17 Aug 2022 08:51:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Show-zero-for-no-records/m-p/1969549#M79996</guid>
      <dc:creator>fzalexanderjohn</dc:creator>
      <dc:date>2022-08-17T08:51:16Z</dc:date>
    </item>
    <item>
      <title>Re: Show zero for no records</title>
      <link>https://community.qlik.com/t5/App-Development/Show-zero-for-no-records/m-p/1969574#M79997</link>
      <description>&lt;P&gt;You could try either of the following - the former ignores all selections and the latter only on specific field(s). Note that "Include zero values" must be checked under Data Handling.&lt;/P&gt;
&lt;P&gt;Sum(Sales)+Sum({1} 0)&lt;/P&gt;
&lt;P&gt;Sum(Sales)+Sum({&amp;lt; Month= , Product=&amp;gt;} 0)&lt;/P&gt;</description>
      <pubDate>Wed, 17 Aug 2022 09:10:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Show-zero-for-no-records/m-p/1969574#M79997</guid>
      <dc:creator>Or</dc:creator>
      <dc:date>2022-08-17T09:10:35Z</dc:date>
    </item>
    <item>
      <title>Re: Show zero for no records</title>
      <link>https://community.qlik.com/t5/App-Development/Show-zero-for-no-records/m-p/1969577#M79998</link>
      <description>&lt;P&gt;Hello Or,&lt;/P&gt;
&lt;P&gt;thank you for your reply. What I didn't make clear in my original post was, that I have to have a selection for products as well. Sorry for that. We have several thousand products and and I only want to select a small subset of them (say 4) for a particular analysis.&lt;/P&gt;
&lt;P&gt;If I use your solution, all products show up... which is expected.&lt;/P&gt;</description>
      <pubDate>Wed, 17 Aug 2022 09:18:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Show-zero-for-no-records/m-p/1969577#M79998</guid>
      <dc:creator>fzalexanderjohn</dc:creator>
      <dc:date>2022-08-17T09:18:18Z</dc:date>
    </item>
    <item>
      <title>Re: Show zero for no records</title>
      <link>https://community.qlik.com/t5/App-Development/Show-zero-for-no-records/m-p/1969583#M79999</link>
      <description>&lt;P&gt;What is your expectation in the scenario where products A and B were selected but C was not? Martin's only row is for product C, so if you aren't displayed non-selected products, what would his row(s) look like?&lt;/P&gt;</description>
      <pubDate>Wed, 17 Aug 2022 09:26:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Show-zero-for-no-records/m-p/1969583#M79999</guid>
      <dc:creator>Or</dc:creator>
      <dc:date>2022-08-17T09:26:44Z</dc:date>
    </item>
    <item>
      <title>Re: Show zero for no records</title>
      <link>https://community.qlik.com/t5/App-Development/Show-zero-for-no-records/m-p/1969651#M80003</link>
      <description>&lt;P&gt;Hello Or,&lt;/P&gt;
&lt;P&gt;If C was not selected, C should not show up. So if I did an analysis for just product A, I want to select A, show all 4 sales people but Karl and Susan with zeros (instead of them not appearing).&lt;/P&gt;
&lt;P&gt;I think I've also just found a way.&lt;/P&gt;
&lt;P&gt;1st Dimension&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;[Sales people]&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;2nd Dimension&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;=if(Match(product, $(=Chr(39) &amp;amp; GetFieldSelections(product,Chr(39)&amp;amp;','&amp;amp;Chr(39),12) &amp;amp; Chr(39) ) ),product)&lt;/LI-CODE&gt;
&lt;P&gt;edit:&lt;/P&gt;
&lt;P&gt;I found the solution for this here:&amp;nbsp;&lt;A href="https://community.qlik.com/t5/New-to-Qlik-Sense/Getfieldselections-with-multiple-values-in-if-condition/td-p/112080" target="_blank"&gt;https://community.qlik.com/t5/New-to-Qlik-Sense/Getfieldselections-with-multiple-values-in-if-condition/td-p/112080&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Measure&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;sum(
Sales
)+
Sum(
{&amp;lt;Month=, Year=, product= &amp;gt;}
0)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 17 Aug 2022 12:09:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Show-zero-for-no-records/m-p/1969651#M80003</guid>
      <dc:creator>fzalexanderjohn</dc:creator>
      <dc:date>2022-08-17T12:09:59Z</dc:date>
    </item>
    <item>
      <title>Re: Show zero for no records</title>
      <link>https://community.qlik.com/t5/App-Development/Show-zero-for-no-records/m-p/1969664#M80004</link>
      <description>&lt;P&gt;If you've found a solution, great. There's quite a few different ways to go about doing something like this and comparing with GetFieldSelections is indeed one of them, though I'd suggest you consider comparing with a concat() of the values instead as it is a more robust option (concat will work if you've implicitly selected the products, for example by selecting Product Group = 'AB' which includes products A and B, but did not explicitly select a product).&lt;/P&gt;
&lt;P&gt;If not, I'm still not sure what your expectation is. Since both A and B were selected, are you expecting one 0 row for each salesperson for A and another one for B?&lt;/P&gt;</description>
      <pubDate>Wed, 17 Aug 2022 12:04:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Show-zero-for-no-records/m-p/1969664#M80004</guid>
      <dc:creator>Or</dc:creator>
      <dc:date>2022-08-17T12:04:58Z</dc:date>
    </item>
    <item>
      <title>Re: Show zero for no records</title>
      <link>https://community.qlik.com/t5/App-Development/Show-zero-for-no-records/m-p/1969783#M80013</link>
      <description>&lt;P&gt;Hello Or,&lt;/P&gt;
&lt;P&gt;could you tell me how it would work with concat? I could not figure it out.&lt;/P&gt;</description>
      <pubDate>Wed, 17 Aug 2022 14:24:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Show-zero-for-no-records/m-p/1969783#M80013</guid>
      <dc:creator>fzalexanderjohn</dc:creator>
      <dc:date>2022-08-17T14:24:26Z</dc:date>
    </item>
    <item>
      <title>Re: Show zero for no records</title>
      <link>https://community.qlik.com/t5/App-Development/Show-zero-for-no-records/m-p/1969849#M80024</link>
      <description>&lt;P&gt;concat(distinct Field) just replaces GetFieldSelections(Field) inside the match. Otherwise everything stays the same.&lt;/P&gt;</description>
      <pubDate>Wed, 17 Aug 2022 15:32:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Show-zero-for-no-records/m-p/1969849#M80024</guid>
      <dc:creator>Or</dc:creator>
      <dc:date>2022-08-17T15:32:30Z</dc:date>
    </item>
  </channel>
</rss>

