<?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 issue with the Count function in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Set-Analysis-issue-with-the-Count-function/m-p/602792#M222768</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try maybe the intersection operator *:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 12pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;count&lt;/SPAN&gt;&lt;SPAN style="font-size: 12pt;"&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;({$&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #800000;"&gt;Flag&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt; *=&lt;/STRONG&gt; {'1'}&amp;gt;} &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #0000ff;"&gt;distinct&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #800000;"&gt;ID&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-size: 12pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;))&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 03 Feb 2014 23:22:30 GMT</pubDate>
    <dc:creator>swuehl</dc:creator>
    <dc:date>2014-02-03T23:22:30Z</dc:date>
    <item>
      <title>Set Analysis issue with the Count function</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-issue-with-the-Count-function/m-p/602790#M222766</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm running into trouble with set analysis and the count function, and hoping the group can help. Basically, I have a formula that is calculating a rate, and I have a flag that indicates weather or not a customer has done a certain activity. That flag is 1 or 0. The rate takes a count of distinct customers that have done this action, and divides it by the total distinct customers in the population.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using set analysis to do this, however when I filter down the numerator (which is the count of people who did an action) doesn't seem to change, while the denominator does.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example, if I have 100 people and 40 took action, my rate is 40%. If I select 0 for the activity flag, the total should be 0/60 = 0%. Instead I'm getting 40/60.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is the code I'm using. Is there an operator I'm missing here?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;count&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;({$&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Flag&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; = {'1'}&amp;gt;} &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;distinct&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;ID&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;)) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;This code returns the same number no matter what my selections are, even if I select Flag = 0&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Feb 2014 22:28:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-issue-with-the-Count-function/m-p/602790#M222766</guid>
      <dc:creator />
      <dc:date>2014-02-03T22:28:47Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis issue with the Count function</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-issue-with-the-Count-function/m-p/602791#M222767</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ken,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is correct behaviour. The Flag={1} in your set analysis is overriding your Flag=0 selection, so it wouldn't change!&lt;/P&gt;&lt;P&gt;Maybe you could duplicate your Flag field in the script, then use on of them in the set analysis and the other in the selection....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Jason&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Feb 2014 23:10:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-issue-with-the-Count-function/m-p/602791#M222767</guid>
      <dc:creator>Jason_Michaelides</dc:creator>
      <dc:date>2014-02-03T23:10:54Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis issue with the Count function</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-issue-with-the-Count-function/m-p/602792#M222768</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try maybe the intersection operator *:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 12pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;count&lt;/SPAN&gt;&lt;SPAN style="font-size: 12pt;"&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;({$&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #800000;"&gt;Flag&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt; *=&lt;/STRONG&gt; {'1'}&amp;gt;} &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #0000ff;"&gt;distinct&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #800000;"&gt;ID&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-size: 12pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;))&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Feb 2014 23:22:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-issue-with-the-Count-function/m-p/602792#M222768</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2014-02-03T23:22:30Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis issue with the Count function</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-issue-with-the-Count-function/m-p/602793#M222769</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;try to use this expression for calculate the rate:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: rgba(255, 255, 255, 0);"&gt;&lt;SPAN style="font-style: inherit;"&gt;Num(count&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit;"&gt;distinct&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit;"&gt;ID&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit;"&gt;))&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-style: inherit; background-color: rgba(255, 255, 255, 0);"&gt;/&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: rgba(255, 255, 255, 0);"&gt;&lt;SPAN style="font-style: inherit;"&gt;count&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit;"&gt;({$&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit;"&gt;Flag&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit;"&gt; = &amp;gt;} &lt;/SPAN&gt;&lt;SPAN style="font-style: inherit;"&gt;distinct&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit;"&gt;ID&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit;"&gt;)) '#.##0%')&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-style: inherit; background-color: rgba(255, 255, 255, 0);"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-style: inherit; background-color: rgba(255, 255, 255, 0);"&gt;so if you select Flag 1, you have the rate of Active else of inactive.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: rgba(255, 255, 255, 0);"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MC&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Feb 2014 00:09:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-issue-with-the-Count-function/m-p/602793#M222769</guid>
      <dc:creator />
      <dc:date>2014-02-04T00:09:50Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis issue with the Count function</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-issue-with-the-Count-function/m-p/602794#M222770</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So doing this works, Im just not sure why and what the implications are for the rest of the data. Can you explain?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Feb 2014 00:29:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-issue-with-the-Count-function/m-p/602794#M222770</guid>
      <dc:creator />
      <dc:date>2014-02-04T00:29:39Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis issue with the Count function</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-issue-with-the-Count-function/m-p/602795#M222771</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Basically u wants % use the following express&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Num((Count ({$&amp;lt;&lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;Flag&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt; = &amp;gt;} distinct (ID&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;/count(total Distinct ID)),’##.##%’)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Feb 2014 05:40:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-issue-with-the-Count-function/m-p/602795#M222771</guid>
      <dc:creator />
      <dc:date>2014-02-04T05:40:23Z</dc:date>
    </item>
  </channel>
</rss>

