<?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: Re: problem writing set expression (exclusion) in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/problem-writing-set-expression-exclusion/m-p/730883#M261793</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In attachment an example qvw file&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 07 Aug 2014 11:10:55 GMT</pubDate>
    <dc:creator />
    <dc:date>2014-08-07T11:10:55Z</dc:date>
    <item>
      <title>problem writing set expression (exclusion)</title>
      <link>https://community.qlik.com/t5/QlikView/problem-writing-set-expression-exclusion/m-p/730876#M261786</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The idea behind the expression is:&lt;/P&gt;&lt;P&gt;I want to count all the products where the weight is 0 and the adjusted_weight does NOT equal 0,1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is the expression that i had (doesn't give the wanted result):&lt;/P&gt;&lt;P&gt;count({&amp;lt;,emptyings_weight={0}, emptyings_adjusted_weight-={'0,1'}&amp;gt;}product_id)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anyone see what is wrong?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;Katleen&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Aug 2014 09:14:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/problem-writing-set-expression-exclusion/m-p/730876#M261786</guid>
      <dc:creator />
      <dc:date>2014-08-07T09:14:17Z</dc:date>
    </item>
    <item>
      <title>Re: problem writing set expression (exclusion)</title>
      <link>https://community.qlik.com/t5/QlikView/problem-writing-set-expression-exclusion/m-p/730877#M261787</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;count({$&amp;lt;emptyings_weight={0}, emptyings_adjusted_weight-={'0,1'}&amp;gt;}product_id)&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Aug 2014 09:15:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/problem-writing-set-expression-exclusion/m-p/730877#M261787</guid>
      <dc:creator>sujeetsingh</dc:creator>
      <dc:date>2014-08-07T09:15:22Z</dc:date>
    </item>
    <item>
      <title>Re: problem writing set expression (exclusion)</title>
      <link>https://community.qlik.com/t5/QlikView/problem-writing-set-expression-exclusion/m-p/730878#M261788</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Remove the first comma. &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;count({&amp;lt;emptyings_weight={0}, emptyings_adjusted_weight-={'0,1'}&amp;gt;}product_id)&lt;/SPAN&gt; should work if your field names are the correct case-sensitive names.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Aug 2014 09:16:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/problem-writing-set-expression-exclusion/m-p/730878#M261788</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2014-08-07T09:16:06Z</dc:date>
    </item>
    <item>
      <title>Re: problem writing set expression (exclusion)</title>
      <link>https://community.qlik.com/t5/QlikView/problem-writing-set-expression-exclusion/m-p/730879#M261789</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Remove the first comma in set analysis.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Kaushik Solanki&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Aug 2014 09:16:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/problem-writing-set-expression-exclusion/m-p/730879#M261789</guid>
      <dc:creator>kaushiknsolanki</dc:creator>
      <dc:date>2014-08-07T09:16:41Z</dc:date>
    </item>
    <item>
      <title>Re: problem writing set expression (exclusion)</title>
      <link>https://community.qlik.com/t5/QlikView/problem-writing-set-expression-exclusion/m-p/730880#M261790</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;All the suggested solutions don't give me the desired result.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need the weight to be 0 AND the adjusted weight to NOT be 0.1.&lt;/P&gt;&lt;P&gt;Otherwise it should not count.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any other ideas?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Aug 2014 10:15:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/problem-writing-set-expression-exclusion/m-p/730880#M261790</guid>
      <dc:creator />
      <dc:date>2014-08-07T10:15:56Z</dc:date>
    </item>
    <item>
      <title>Re: problem writing set expression (exclusion)</title>
      <link>https://community.qlik.com/t5/QlikView/problem-writing-set-expression-exclusion/m-p/730881#M261791</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sure, post the offending document so we can have a look with all the context available.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Aug 2014 10:17:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/problem-writing-set-expression-exclusion/m-p/730881#M261791</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2014-08-07T10:17:52Z</dc:date>
    </item>
    <item>
      <title>Re: problem writing set expression (exclusion)</title>
      <link>https://community.qlik.com/t5/QlikView/problem-writing-set-expression-exclusion/m-p/730882#M261792</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;count({&amp;lt;product_id = E({&amp;lt;emptyings_adjusted_weight = {'0,1'}&amp;gt;} product_id), emptyings_weight={0}&amp;gt;} product_id)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Aug 2014 10:25:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/problem-writing-set-expression-exclusion/m-p/730882#M261792</guid>
      <dc:creator>jerrysvensson</dc:creator>
      <dc:date>2014-08-07T10:25:10Z</dc:date>
    </item>
    <item>
      <title>Re: Re: problem writing set expression (exclusion)</title>
      <link>https://community.qlik.com/t5/QlikView/problem-writing-set-expression-exclusion/m-p/730883#M261793</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In attachment an example qvw file&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Aug 2014 11:10:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/problem-writing-set-expression-exclusion/m-p/730883#M261793</guid>
      <dc:creator />
      <dc:date>2014-08-07T11:10:55Z</dc:date>
    </item>
    <item>
      <title>Re: problem writing set expression (exclusion)</title>
      <link>https://community.qlik.com/t5/QlikView/problem-writing-set-expression-exclusion/m-p/730884#M261794</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Did you try my suggestion? It should work fine.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Aug 2014 11:35:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/problem-writing-set-expression-exclusion/m-p/730884#M261794</guid>
      <dc:creator>jerrysvensson</dc:creator>
      <dc:date>2014-08-07T11:35:02Z</dc:date>
    </item>
    <item>
      <title>Re: Re: problem writing set expression (exclusion)</title>
      <link>https://community.qlik.com/t5/QlikView/problem-writing-set-expression-exclusion/m-p/730885#M261795</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Your suggestion is used in the example file, doesn't work unfortunalty.&lt;/P&gt;&lt;P&gt;Perhaps you can take a look at the qvw document to see why it doesn't work?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;Katleen&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Aug 2014 11:47:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/problem-writing-set-expression-exclusion/m-p/730885#M261795</guid>
      <dc:creator />
      <dc:date>2014-08-07T11:47:26Z</dc:date>
    </item>
    <item>
      <title>Re: problem writing set expression (exclusion)</title>
      <link>https://community.qlik.com/t5/QlikView/problem-writing-set-expression-exclusion/m-p/730886#M261796</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There are several issues. First you count product_id. That is a key field, so it's not clear which table should be used for the count. Never use a key field in a count, unless it's a count distinct.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Next, 0 is not 0,0. So weight={0} doesn't match any records. Use '0,0' instead.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Finally I cannot match your count of 482 with the data in the document you posted. I get a result of 2140 using this expression: count({&amp;lt; weight={'0,0'}, adjusted_weight-={'0,0','1,0'}&amp;gt;} emptyings_id ).&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;This is the same number I get by adding all the fields in a table box object and making the selections using listboxes. First select Oudenaarde, next select 0,0 and 1,0 in the field adjusted_weight and invert the selection in that field by choosing select excluded. Finally select 0,0 in the field weight. The table box now shows 2140 records.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;IMG alt="comm128619.png" class="jive-image" src="https://community.qlik.com/legacyfs/online/63950_comm128619.png" style="width: 620px; height: 411px;" /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Aug 2014 12:05:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/problem-writing-set-expression-exclusion/m-p/730886#M261796</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2014-08-07T12:05:34Z</dc:date>
    </item>
    <item>
      <title>Re: problem writing set expression (exclusion)</title>
      <link>https://community.qlik.com/t5/QlikView/problem-writing-set-expression-exclusion/m-p/730887#M261797</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;count({&amp;lt;product_id = E({&amp;lt;emptyings_adjusted_weight = {'0,1'}&amp;gt;} product_id), emptyings_weight={&lt;STRONG&gt;'0,0'&lt;/STRONG&gt;}&amp;gt;} product_id)&lt;/P&gt;&lt;P&gt;Gives result :2181.&lt;/P&gt;&lt;P&gt;You need to change your data model. Can you give us the SQL code that matches the 482 result?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Aug 2014 12:07:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/problem-writing-set-expression-exclusion/m-p/730887#M261797</guid>
      <dc:creator>jerrysvensson</dc:creator>
      <dc:date>2014-08-07T12:07:12Z</dc:date>
    </item>
    <item>
      <title>Re: Re: problem writing set expression (exclusion)</title>
      <link>https://community.qlik.com/t5/QlikView/problem-writing-set-expression-exclusion/m-p/730888#M261798</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;My fault, I didn't make it very clear.&lt;/P&gt;&lt;P&gt;In the example file I simulated the result with selections.&lt;/P&gt;&lt;P&gt;The result should be 4630.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I checked it in SQL, You can see it in the attached file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;Katleen&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Aug 2014 06:13:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/problem-writing-set-expression-exclusion/m-p/730888#M261798</guid>
      <dc:creator />
      <dc:date>2014-08-08T06:13:05Z</dc:date>
    </item>
  </channel>
</rss>

