<?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 modifier problem with empty column in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Set-modifier-problem-with-empty-column/m-p/811291#M286371</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Just set the flag as if(Expression1&amp;gt;=1001,1,0) as Over1000Flag. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 11 Dec 2014 01:47:22 GMT</pubDate>
    <dc:creator>simenkg</dc:creator>
    <dc:date>2014-12-11T01:47:22Z</dc:date>
    <item>
      <title>Set modifier problem with empty column</title>
      <link>https://community.qlik.com/t5/QlikView/Set-modifier-problem-with-empty-column/m-p/811290#M286370</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;I have found a case where a set modifier that searches a column containing all nulls returns ALL rows from the table. I would expect it to return no rows, since there is no row where the search condition is true. This problem appeared when I created a set analysis expression that averaged rows for a field value that has not yet been populated in the source data. We expected to initially see zeros in the chart until the users start to enter the new value, but instead we saw values in the chart for rows that contain no data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm attaching a .qvw that illustrates the problem. It uses the test script that's built into the script editor. In the load script, the field Over1000Flag contains all nulls because no rows have values in Expression1 more than 1000. The field Over1000Flag_v2 also contains nulls; then I concatenated a single row to the table with a character in this field and no other fields. This is the only workaround I've found so far.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the straight table chart, this expression returns the incorrect sum for all rows in the table, even though no rows contain 1 in the flag field:&lt;/P&gt;&lt;P&gt;=&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;({ $ &amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Over1000Flag&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;={1}&amp;gt;} &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Expression1&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;) &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;SPAN&gt;This expression, however, returns zero, which is correct:&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;=&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;({ $ &amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Over1000Flag_v2&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;={1}&amp;gt;} &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Expression1&lt;/SPAN&gt;&lt;SPAN style="font-size: 1;"&gt;) &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;I wanted to get feedback from the community before opening a support ticket / bug report, in case I'm just missing something obvious here.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;-James&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Dec 2014 22:26:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-modifier-problem-with-empty-column/m-p/811290#M286370</guid>
      <dc:creator>jcarpenter9</dc:creator>
      <dc:date>2014-12-10T22:26:28Z</dc:date>
    </item>
    <item>
      <title>Re: Set modifier problem with empty column</title>
      <link>https://community.qlik.com/t5/QlikView/Set-modifier-problem-with-empty-column/m-p/811291#M286371</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Just set the flag as if(Expression1&amp;gt;=1001,1,0) as Over1000Flag. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Dec 2014 01:47:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-modifier-problem-with-empty-column/m-p/811291#M286371</guid>
      <dc:creator>simenkg</dc:creator>
      <dc:date>2014-12-11T01:47:22Z</dc:date>
    </item>
    <item>
      <title>Re: Set modifier problem with empty column</title>
      <link>https://community.qlik.com/t5/QlikView/Set-modifier-problem-with-empty-column/m-p/811292#M286372</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I suggest you report this to support. My gut feeling is that it is a bug.&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;HIC &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Dec 2014 08:42:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-modifier-problem-with-empty-column/m-p/811292#M286372</guid>
      <dc:creator>hic</dc:creator>
      <dc:date>2014-12-11T08:42:29Z</dc:date>
    </item>
    <item>
      <title>Re: Set modifier problem with empty column</title>
      <link>https://community.qlik.com/t5/QlikView/Set-modifier-problem-with-empty-column/m-p/811293#M286373</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think this is a very dangerous issue and unexpected behavior.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However I tend to not use flags at all since they consume memory espacially in fact tables. A set analysis search expression seems to work in that case:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=Sum({ $ &amp;lt;Expression1={"&amp;gt;=1001"}&amp;gt;} Expression1)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Ralf&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Dec 2014 09:37:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-modifier-problem-with-empty-column/m-p/811293#M286373</guid>
      <dc:creator>rbecher</dc:creator>
      <dc:date>2014-12-11T09:37:26Z</dc:date>
    </item>
    <item>
      <title>Re: Set modifier problem with empty column</title>
      <link>https://community.qlik.com/t5/QlikView/Set-modifier-problem-with-empty-column/m-p/811294#M286374</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you, Henric. I will follow up with support.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Dec 2014 13:57:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-modifier-problem-with-empty-column/m-p/811294#M286374</guid>
      <dc:creator>jcarpenter9</dc:creator>
      <dc:date>2014-12-11T13:57:22Z</dc:date>
    </item>
    <item>
      <title>Re: Set modifier problem with empty column</title>
      <link>https://community.qlik.com/t5/QlikView/Set-modifier-problem-with-empty-column/m-p/811295#M286375</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for the feedback. I agree that flags do consume memory. However, the best practice as taught in QlikView's training course is to use summable numeric flags for better online set analysis performance, as opposed to text searches.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the actual client application we need to use flags for another reason, because the search values will change occasionally. I want to avoid modifying expressions and variables across the end user applications if I can modify a single QVD creator step to handle new search values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-James&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Dec 2014 14:02:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-modifier-problem-with-empty-column/m-p/811295#M286375</guid>
      <dc:creator>jcarpenter9</dc:creator>
      <dc:date>2014-12-11T14:02:50Z</dc:date>
    </item>
    <item>
      <title>Re: Set modifier problem with empty column</title>
      <link>https://community.qlik.com/t5/QlikView/Set-modifier-problem-with-empty-column/m-p/811296#M286376</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi James,&lt;/P&gt;&lt;P&gt;I do not agree with a lot of so called "best practices" people are teaching around. Most of them are already outdated or false. However, you could also solve your problem with storing set analysis conditions into variables..&lt;/P&gt;&lt;P&gt;- Ralf&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Dec 2014 14:06:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-modifier-problem-with-empty-column/m-p/811296#M286376</guid>
      <dc:creator>rbecher</dc:creator>
      <dc:date>2014-12-11T14:06:31Z</dc:date>
    </item>
    <item>
      <title>Re: Set modifier problem with empty column</title>
      <link>https://community.qlik.com/t5/QlikView/Set-modifier-problem-with-empty-column/m-p/811297#M286377</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Logged as support case 00400014.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Dec 2014 14:16:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-modifier-problem-with-empty-column/m-p/811297#M286377</guid>
      <dc:creator>jcarpenter9</dc:creator>
      <dc:date>2014-12-11T14:16:53Z</dc:date>
    </item>
    <item>
      <title>Re: Set modifier problem with empty column</title>
      <link>https://community.qlik.com/t5/QlikView/Set-modifier-problem-with-empty-column/m-p/811298#M286378</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not all best practices are actually 'best'. But as long as the official QlikView training materials teach a certain technique, the product ought to actually support using that technique accurately, I think. Whatever workaround turns out to work best, a set modifier condition for which zero rows are true ought not to return all rows.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Dec 2014 14:20:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-modifier-problem-with-empty-column/m-p/811298#M286378</guid>
      <dc:creator>jcarpenter9</dc:creator>
      <dc:date>2014-12-11T14:20:39Z</dc:date>
    </item>
    <item>
      <title>Re: Set modifier problem with empty column</title>
      <link>https://community.qlik.com/t5/QlikView/Set-modifier-problem-with-empty-column/m-p/811299#M286379</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I would still recommend using flags. The additional memory a flag uses is minimal, also in a fact table. And the advantage is often clarity and manageability of your formulas. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ralf is right, though, that a Set Analysis expression containing a search, e.g. {$&amp;lt;Expression1={"&amp;gt;=1001"}&amp;gt;}, also is very efficient. I would expect the performance difference between the two to be almost negligible.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HIC&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Dec 2014 09:58:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-modifier-problem-with-empty-column/m-p/811299#M286379</guid>
      <dc:creator>hic</dc:creator>
      <dc:date>2014-12-12T09:58:16Z</dc:date>
    </item>
    <item>
      <title>Re: Set modifier problem with empty column</title>
      <link>https://community.qlik.com/t5/QlikView/Set-modifier-problem-with-empty-column/m-p/811300#M286380</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here is an update. Qlik Support replied to my bug report that null handling is tricky and that they do not consider this a problem. They suggested a workaround of always ensuring that the column referenced in a set modifier contain non-null values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't agree with this assessment. If a) a column is all nulls, and b) a set modifier searches for rows where that column contains 'y', then c) QlikView should return no rows, not all rows, because the condition is not true or not known for any row.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If on the other hand the set modifier logic only needs the condition to be "not false", this needs to be loudly documented. Likewise, if a column with some nulls is handled differently from a column with all nulls. I don't think that most developers would expect it to work in this manner.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I asked them to reconsider their decision.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- James&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Dec 2014 16:09:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-modifier-problem-with-empty-column/m-p/811300#M286380</guid>
      <dc:creator>jcarpenter9</dc:creator>
      <dc:date>2014-12-22T16:09:57Z</dc:date>
    </item>
    <item>
      <title>Re: Set modifier problem with empty column</title>
      <link>https://community.qlik.com/t5/QlikView/Set-modifier-problem-with-empty-column/m-p/811301#M286381</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think unexpected behavior is a show stopper for Set Analysis..&lt;/P&gt;&lt;P&gt;- Ralf&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Dec 2014 17:58:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-modifier-problem-with-empty-column/m-p/811301#M286381</guid>
      <dc:creator>rbecher</dc:creator>
      <dc:date>2014-12-22T17:58:54Z</dc:date>
    </item>
  </channel>
</rss>

