<?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: Problem with Set Analysis in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Problem-with-Set-Analysis/m-p/449057#M488590</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;S, I unterstood. Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 19 Dec 2012 08:40:17 GMT</pubDate>
    <dc:creator />
    <dc:date>2012-12-19T08:40:17Z</dc:date>
    <item>
      <title>Problem with Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-Set-Analysis/m-p/449053#M488586</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everyone, I am a newbie to QlikView and I am now studying the use of set analysis&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to use an expression to select the number of distinct customer who purchases certain product from lines of sales order data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please kindly describe what is the difference between &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 14pt;"&gt;Count({$&amp;lt;Product={&lt;SPAN style="color: #ff0000;"&gt;'&lt;/SPAN&gt;$(TargetProduct)&lt;SPAN style="color: #ff0000;"&gt;'&lt;/SPAN&gt;}&amp;gt;} DISTINCT [Customer])&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;and&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 14pt;"&gt;Count({$&amp;lt;Product={$(TargetProduct)}&amp;gt;} DISTINCT [Customer])&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;where TargetProduct is a variable name and can be changed by button click actions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I suppose the second one should be used but it shows nothing while the first statement works.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Dec 2012 04:00:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-Set-Analysis/m-p/449053#M488586</guid>
      <dc:creator>laujerry</dc:creator>
      <dc:date>2012-12-19T04:00:33Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-Set-Analysis/m-p/449054#M488587</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;These two expression are working for me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can u post ur qvw file?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Kabilan K.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Dec 2012 05:04:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-Set-Analysis/m-p/449054#M488587</guid>
      <dc:creator />
      <dc:date>2012-12-19T05:04:14Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-Set-Analysis/m-p/449055#M488588</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi kabilan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i am sorry the data source is from my company and cannot be shared here&lt;/P&gt;&lt;P&gt;but what i think is that the two expressions should be different&lt;/P&gt;&lt;P&gt;which the first one is trying to match the exact string specified in quotations&lt;/P&gt;&lt;P&gt;and the second one is to replace the variable with another value&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i present the expression as a value of text field, sth like: =Count(....&lt;/P&gt;&lt;P&gt;the first expression shows me the correct number and the second displays "-"&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Dec 2012 07:08:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-Set-Analysis/m-p/449055#M488588</guid>
      <dc:creator>laujerry</dc:creator>
      <dc:date>2012-12-19T07:08:44Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-Set-Analysis/m-p/449056#M488589</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;See the attached file..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;These two expression are working.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;~kabilan K&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Dec 2012 07:34:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-Set-Analysis/m-p/449056#M488589</guid>
      <dc:creator />
      <dc:date>2012-12-19T07:34:11Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-Set-Analysis/m-p/449057#M488590</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;S, I unterstood. Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Dec 2012 08:40:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-Set-Analysis/m-p/449057#M488590</guid>
      <dc:creator />
      <dc:date>2012-12-19T08:40:17Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-Set-Analysis/m-p/449058#M488591</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am using the personal edition qlikview and cannot open your file&lt;/P&gt;&lt;P&gt;but btw, so do you mean the 2 expressions are syntactically the same?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Dec 2012 01:06:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-Set-Analysis/m-p/449058#M488591</guid>
      <dc:creator>laujerry</dc:creator>
      <dc:date>2012-12-24T01:06:48Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-Set-Analysis/m-p/449059#M488592</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;use aggr function&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;aggr(num(&lt;SPAN style="color: #737373; font-family: Arial; font-size: 19px; background-color: #ffffff;"&gt;{$&amp;lt;Product={(TargetProduct)}&amp;gt;})count(distinct [Customer]))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #737373; font-family: Arial; font-size: 19px; background-color: #ffffff;"&gt;hope it helps you&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #737373; font-size: 19px; font-family: Arial;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Dec 2012 06:32:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-Set-Analysis/m-p/449059#M488592</guid>
      <dc:creator>er_mohit</dc:creator>
      <dc:date>2012-12-24T06:32:15Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-Set-Analysis/m-p/449060#M488593</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; You are right only first expression will work.&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; The difference is because of the Data Type of the parameter you are passing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; In your example you are passing the Target Product which is a String, and when ever you are passing String as a parameter it should be enclosed in single quote.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; But if you are passing the Number as parameter, you dont need to enclosed it in quote.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; And because of this your first expression works properly but not second.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Hope this will clear the doubt.&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>Mon, 24 Dec 2012 06:56:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-Set-Analysis/m-p/449060#M488593</guid>
      <dc:creator>kaushiknsolanki</dc:creator>
      <dc:date>2012-12-24T06:56:24Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-Set-Analysis/m-p/449061#M488598</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kaushik Solanki,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We can write set anlysis for String with out single quote like below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Bold"&gt;sum(&lt;/SPAN&gt; {$&amp;lt;Region= {America} &amp;gt;} Sales&lt;SPAN class="Bold"&gt; )&amp;nbsp;&amp;nbsp; /// It returns correct result&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Bold"&gt;sum(&lt;/SPAN&gt; {$&amp;lt;Region= {'America'} &amp;gt;} Sales&lt;SPAN class="Bold"&gt; )&amp;nbsp; /// It returns correct result&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Bold"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Bold"&gt;But below is wont give a result&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Bold"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Bold"&gt;sum(&lt;/SPAN&gt; {$&amp;lt;Region= {Ame*} &amp;gt;} Sales&lt;SPAN class="Bold"&gt; ) // It won't work&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Bold"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Bold"&gt;that s Y we use a single quote mark&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Bold"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Bold"&gt;sum(&lt;/SPAN&gt; {$&amp;lt;Region= {'Ame*'} &amp;gt;} Sales&lt;SPAN class="Bold"&gt; ) // It will work&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Bold"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Bold"&gt;I hope, all are understand&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Bold"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Bold"&gt;~Kabilan K&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Dec 2012 07:21:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-Set-Analysis/m-p/449061#M488598</guid>
      <dc:creator />
      <dc:date>2012-12-24T07:21:45Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-Set-Analysis/m-p/449062#M488599</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The first works because the value in your variable isn't enclosed in single quotes. So after expanding the variable you have a filter like Product={'Cookies'}. But in the second expression it will be Product={Cookies}. That won't work because it will treat Cookies as a number because of the missing single quotes. If your variable had a value that included the quotes, i.e. &lt;EM&gt;'Cookies','Candy' &lt;/EM&gt;then the second expression would work and the first wouldn't. The second expression would have as filter Product={'Cookies','Candy'} to limit Product to Cookies and Candy.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Dec 2012 09:23:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-Set-Analysis/m-p/449062#M488599</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2012-12-24T09:23:31Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-Set-Analysis/m-p/449063#M488600</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;A to the point answer by Gysbert..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Dec 2012 10:23:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-Set-Analysis/m-p/449063#M488600</guid>
      <dc:creator>sujeetsingh</dc:creator>
      <dc:date>2012-12-24T10:23:33Z</dc:date>
    </item>
  </channel>
</rss>

