<?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: count distinct and set analysis in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/count-distinct-and-set-analysis/m-p/1379355#M420718</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;try this &lt;/P&gt;&lt;P&gt;small change in sunny exp&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f2f2f2;"&gt;=Count(If(Actual &amp;gt;= Target and Target &amp;gt; 0, &lt;STRONG style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f2f2f2;"&gt;DISTINCT&amp;nbsp; &lt;/STRONG&gt;Customer))&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 17 Oct 2017 12:30:25 GMT</pubDate>
    <dc:creator>Chanty4u</dc:creator>
    <dc:date>2017-10-17T12:30:25Z</dc:date>
    <item>
      <title>count distinct and set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/count-distinct-and-set-analysis/m-p/1379352#M420715</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everyone, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm having an issue with count distinct and set analysis. &lt;/P&gt;&lt;P&gt;Basically each customer has a target score and an actual score.&lt;/P&gt;&lt;P&gt;I want to know how many customers have actual &amp;gt;= target AND target&amp;gt;0&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so my formula is &lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #993366;"&gt;&lt;SPAN style="color: #0000ff;"&gt;Count&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff;"&gt;Distinct&lt;/SPAN&gt; &lt;SPAN style="color: #000000;"&gt;{&amp;lt;&lt;/SPAN&gt;Customer&lt;SPAN style="color: #000000;"&gt;={&lt;/SPAN&gt;"=sum(Actual)&amp;gt;=sum(Target)"&lt;SPAN style="color: #000000;"&gt;}*{&lt;/SPAN&gt;"=sum(Target)&amp;gt;0"&lt;SPAN style="color: #000000;"&gt;}&amp;gt;}&lt;/SPAN&gt;Customer&lt;SPAN style="color: #000000;"&gt;) &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;It works fine if my dimension = Customer. &lt;BR /&gt;However, if my dimension = Product, then the count is wrong.&lt;/P&gt;&lt;P&gt;I feel like the set analysis is incorrect... perhaps an aggr somewhere? &lt;/P&gt;&lt;P&gt;I can't seem to figure it out... &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've attached a qvw below. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help would be greatly appreciated!!! &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Oct 2017 04:58:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/count-distinct-and-set-analysis/m-p/1379352#M420715</guid>
      <dc:creator>ninnartx</dc:creator>
      <dc:date>2017-10-17T04:58:53Z</dc:date>
    </item>
    <item>
      <title>Re: count distinct and set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/count-distinct-and-set-analysis/m-p/1379353#M420716</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is this you are looking?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;=Count({&amp;lt;Customer={"=(sum(Actual)&amp;gt;=sum(Target)) and (sum(Target)&amp;gt;0)"}&amp;gt;} DISTINCT Aggr(If((Sum(Actual) &amp;gt;= Sum(Target)) and Sum(Target)&amp;gt;0, Customer), Prod, Customer))&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Oct 2017 05:26:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/count-distinct-and-set-analysis/m-p/1379353#M420716</guid>
      <dc:creator>Anil_Babu_Samineni</dc:creator>
      <dc:date>2017-10-17T05:26:50Z</dc:date>
    </item>
    <item>
      <title>Re: count distinct and set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/count-distinct-and-set-analysis/m-p/1379354#M420717</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;May be you need this when you view th e chart by Prod&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;=Count(DISTINCT If(Actual &amp;gt;= Target and Target &amp;gt; 0, Customer))&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Oct 2017 12:05:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/count-distinct-and-set-analysis/m-p/1379354#M420717</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2017-10-17T12:05:00Z</dc:date>
    </item>
    <item>
      <title>Re: count distinct and set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/count-distinct-and-set-analysis/m-p/1379355#M420718</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;try this &lt;/P&gt;&lt;P&gt;small change in sunny exp&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f2f2f2;"&gt;=Count(If(Actual &amp;gt;= Target and Target &amp;gt; 0, &lt;STRONG style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f2f2f2;"&gt;DISTINCT&amp;nbsp; &lt;/STRONG&gt;Customer))&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Oct 2017 12:30:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/count-distinct-and-set-analysis/m-p/1379355#M420718</guid>
      <dc:creator>Chanty4u</dc:creator>
      <dc:date>2017-10-17T12:30:25Z</dc:date>
    </item>
    <item>
      <title>Re: count distinct and set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/count-distinct-and-set-analysis/m-p/1379356#M420719</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't think DISTINCT can be used like you have used... I think mine was working just fine&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Oct 2017 12:33:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/count-distinct-and-set-analysis/m-p/1379356#M420719</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2017-10-17T12:33:16Z</dc:date>
    </item>
    <item>
      <title>Re: count distinct and set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/count-distinct-and-set-analysis/m-p/1379357#M420720</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;THANK YOU!! &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Oct 2017 03:27:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/count-distinct-and-set-analysis/m-p/1379357#M420720</guid>
      <dc:creator>ninnartx</dc:creator>
      <dc:date>2017-10-19T03:27:32Z</dc:date>
    </item>
    <item>
      <title>Re: count distinct and set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/count-distinct-and-set-analysis/m-p/1379358#M420721</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i got an error for both of the expressions above for some reason... but Anil's suggestion worked for me. Thank you so much anyway! &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Oct 2017 03:30:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/count-distinct-and-set-analysis/m-p/1379358#M420721</guid>
      <dc:creator>ninnartx</dc:creator>
      <dc:date>2017-10-19T03:30:49Z</dc:date>
    </item>
  </channel>
</rss>

