<?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: Set analysis not working when table is empty in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Set-analysis-not-working-when-table-is-empty/m-p/1911319#M75106</link>
    <description>&lt;P&gt;I get the same behavior unfortunately.&lt;/P&gt;</description>
    <pubDate>Tue, 29 Mar 2022 15:08:45 GMT</pubDate>
    <dc:creator>dselgo_eidex</dc:creator>
    <dc:date>2022-03-29T15:08:45Z</dc:date>
    <item>
      <title>Set analysis not working when table is empty</title>
      <link>https://community.qlik.com/t5/App-Development/Set-analysis-not-working-when-table-is-empty/m-p/1907038#M74753</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;I bug showed up in our application that I thought was a little weird. Let's say that we have the following two tables:&lt;/P&gt;
&lt;P&gt;Table A:&lt;/P&gt;
&lt;TABLE border="1" width="100%"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="50%" height="25px"&gt;KEY&lt;/TD&gt;
&lt;TD width="50%" height="25px"&gt;YEAR&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="50%" height="25px"&gt;1&lt;/TD&gt;
&lt;TD width="50%" height="25px"&gt;2022&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Table B (empty):&lt;/P&gt;
&lt;TABLE border="1" width="100%"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="50%"&gt;KEY&lt;/TD&gt;
&lt;TD width="50%"&gt;NAME&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In this app I have a listbox which generates a list of the years available for records with a certain name in Table B. Its expression is:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;=aggr(only({1&amp;lt;B.NAME = {'Foo'}&amp;gt;} DISTINCT A.YEAR), A.YEAR)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Normally this works fine, but when Table B is empty it results in "2022". I would expect it to result in NULL. Just using only returns the same:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;=only({1&amp;lt;B.NAME = {'Foo'}&amp;gt;} DISTINCT A.YEAR)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Just wondering why this happens and if there is an easy way around it other than using an if statement.&lt;/P&gt;</description>
      <pubDate>Fri, 18 Mar 2022 14:46:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Set-analysis-not-working-when-table-is-empty/m-p/1907038#M74753</guid>
      <dc:creator>dselgo_eidex</dc:creator>
      <dc:date>2022-03-18T14:46:08Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis not working when table is empty</title>
      <link>https://community.qlik.com/t5/App-Development/Set-analysis-not-working-when-table-is-empty/m-p/1907166#M74769</link>
      <description>&lt;P&gt;Pl check what do you see with below modification&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;=aggr(only({1&amp;lt;A.YEAR = P({&amp;lt;B.NAME={'Foo'}&amp;gt;})&amp;gt;} DISTINCT A.YEAR), A.YEAR)&lt;/LI-CODE&gt;
&lt;P&gt;s&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 18 Mar 2022 19:57:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Set-analysis-not-working-when-table-is-empty/m-p/1907166#M74769</guid>
      <dc:creator>Digvijay_Singh</dc:creator>
      <dc:date>2022-03-18T19:57:56Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis not working when table is empty</title>
      <link>https://community.qlik.com/t5/App-Development/Set-analysis-not-working-when-table-is-empty/m-p/1907548#M74791</link>
      <description>&lt;P&gt;It's not a bug else an intended behaviour respectively a side-effect. Set analysis evaluates the selection states of TRUE or FALSE which aren't available by NULL. Therefore these statements will be ignored (also if there is a none existing field specified). Of course Qlik might have been implemented any additionally logic before the evaluation to fetch such scenarios but it adds an overhead and they decided against it to speed up the performance.&lt;/P&gt;
&lt;P&gt;- Marcus&lt;/P&gt;</description>
      <pubDate>Mon, 21 Mar 2022 11:29:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Set-analysis-not-working-when-table-is-empty/m-p/1907548#M74791</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2022-03-21T11:29:00Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis not working when table is empty</title>
      <link>https://community.qlik.com/t5/App-Development/Set-analysis-not-working-when-table-is-empty/m-p/1911319#M75106</link>
      <description>&lt;P&gt;I get the same behavior unfortunately.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Mar 2022 15:08:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Set-analysis-not-working-when-table-is-empty/m-p/1911319#M75106</guid>
      <dc:creator>dselgo_eidex</dc:creator>
      <dc:date>2022-03-29T15:08:45Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis not working when table is empty</title>
      <link>https://community.qlik.com/t5/App-Development/Set-analysis-not-working-when-table-is-empty/m-p/1911322#M75108</link>
      <description>&lt;P&gt;Gotcha. Thanks for confirming this!&lt;/P&gt;</description>
      <pubDate>Tue, 29 Mar 2022 15:09:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Set-analysis-not-working-when-table-is-empty/m-p/1911322#M75108</guid>
      <dc:creator>dselgo_eidex</dc:creator>
      <dc:date>2022-03-29T15:09:36Z</dc:date>
    </item>
  </channel>
</rss>

