<?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: How can I turn my Count (Distinct If into a set expression? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/How-can-I-turn-my-Count-Distinct-If-into-a-set-expression/m-p/12448#M2033</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Are you may be missing a DISTINCT?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Count(&lt;SPAN style="color: #ff0000;"&gt;DISTINCT&lt;/SPAN&gt; {&amp;lt; Counter = {'1'}, Shop -= {'1101'}&amp;gt;} Kvitto*_YTD_WTY)&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 26 Feb 2018 13:25:39 GMT</pubDate>
    <dc:creator>sunny_talwar</dc:creator>
    <dc:date>2018-02-26T13:25:39Z</dc:date>
    <item>
      <title>How can I turn my Count (Distinct If into a set expression?</title>
      <link>https://community.qlik.com/t5/QlikView/How-can-I-turn-my-Count-Distinct-If-into-a-set-expression/m-p/12446#M2031</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is it possible to turn the Count (Distinct expression into a set?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I really hate the performance drainer that count distinct is.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is an expression:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-family: courier\ new, courier;"&gt;Count (Distinct if&lt;/SPAN&gt;&lt;SPAN style="font-family: courier\ new, courier;"&gt;(&lt;SPAN style="color: #800000;"&gt;Counter&lt;/SPAN&gt;='1'&lt;SPAN style="color: #0000ff;"&gt;and&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;Shop&lt;/SPAN&gt; &amp;lt;&amp;gt; '1101' &lt;SPAN style="color: #0000ff;"&gt;and&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;_YTD_WTY&lt;/SPAN&gt;='1',&lt;SPAN style="color: #800000;"&gt;Kvitto&lt;/SPAN&gt;))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #575757;"&gt;I'm thinking:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier\ new, courier;"&gt;&lt;SPAN style="color: #0000ff;"&gt;Count&lt;/SPAN&gt; ( {&amp;lt; &lt;SPAN style="color: #800000;"&gt;Counter&lt;/SPAN&gt; = {'1'}, &lt;SPAN style="color: #800000;"&gt;Shop&lt;/SPAN&gt; -= {'1101'} &amp;gt;} &lt;SPAN style="color: #800000;"&gt;Kvitto&lt;/SPAN&gt;*&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-family: courier\ new, courier;"&gt;_YTD_WTY)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #800000; font-family: courier\ new, courier;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #575757; font-family: arial, helvetica, sans-serif;"&gt;The thing is that when I use the set expression (which works btw) my data changes. I use the formula to calculate number of transactions (Kvitto translates into Receipt in Swedish). So the whole expression is then later divided by visitors. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif; color: #575757;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif; color: #575757;"&gt;I can see the changes are small but nonetheless there. Some results change from 2.3% to 2.4% and similar.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif; color: #575757;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #575757; font-family: arial, helvetica, sans-serif;"&gt;Where am I going wrong with this?&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Feb 2018 13:16:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-can-I-turn-my-Count-Distinct-If-into-a-set-expression/m-p/12446#M2031</guid>
      <dc:creator>robinwiman</dc:creator>
      <dc:date>2018-02-26T13:16:41Z</dc:date>
    </item>
    <item>
      <title>Re: How can I turn my Count (Distinct If into a set expression?</title>
      <link>https://community.qlik.com/t5/QlikView/How-can-I-turn-my-Count-Distinct-If-into-a-set-expression/m-p/12447#M2032</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This this way?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: 'courier new', courier;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #0000ff;"&gt;Count&lt;/SPAN&gt; ( {&amp;lt; &lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #800000;"&gt;Counter&lt;/SPAN&gt; = {'1'}, &lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #800000;"&gt;Shop&lt;/SPAN&gt; -= {'1101'}, &lt;SPAN style="color: #800000; font-family: 'courier new', courier; font-size: 13px;"&gt;_YTD_WTY={1}&lt;/SPAN&gt; &amp;gt;} &lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #800000;"&gt;Kvitto&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: 'courier new', courier; color: #800000;"&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: 'courier new', courier; color: #800000;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Feb 2018 13:20:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-can-I-turn-my-Count-Distinct-If-into-a-set-expression/m-p/12447#M2032</guid>
      <dc:creator>Anil_Babu_Samineni</dc:creator>
      <dc:date>2018-02-26T13:20:31Z</dc:date>
    </item>
    <item>
      <title>Re: How can I turn my Count (Distinct If into a set expression?</title>
      <link>https://community.qlik.com/t5/QlikView/How-can-I-turn-my-Count-Distinct-If-into-a-set-expression/m-p/12448#M2033</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Are you may be missing a DISTINCT?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Count(&lt;SPAN style="color: #ff0000;"&gt;DISTINCT&lt;/SPAN&gt; {&amp;lt; Counter = {'1'}, Shop -= {'1101'}&amp;gt;} Kvitto*_YTD_WTY)&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Feb 2018 13:25:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-can-I-turn-my-Count-Distinct-If-into-a-set-expression/m-p/12448#M2033</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2018-02-26T13:25:39Z</dc:date>
    </item>
    <item>
      <title>Re: How can I turn my Count (Distinct If into a set expression?</title>
      <link>https://community.qlik.com/t5/QlikView/How-can-I-turn-my-Count-Distinct-If-into-a-set-expression/m-p/12449#M2034</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yeah, this works!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So just a follow-up question; how would the two expressions compare performance-wise? Isn't Count(DISTINCT quite heavy to calculate ? Albeit the removed If-expression should do its part.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Feb 2018 13:31:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-can-I-turn-my-Count-Distinct-If-into-a-set-expression/m-p/12449#M2034</guid>
      <dc:creator>robinwiman</dc:creator>
      <dc:date>2018-02-26T13:31:23Z</dc:date>
    </item>
    <item>
      <title>Re: How can I turn my Count (Distinct If into a set expression?</title>
      <link>https://community.qlik.com/t5/QlikView/How-can-I-turn-my-Count-Distinct-If-into-a-set-expression/m-p/12450#M2035</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It is a myth as suggested by HIC&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/qlik-blogpost/3381"&gt;A Myth About Count(distinct …)&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Feb 2018 13:36:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-can-I-turn-my-Count-Distinct-If-into-a-set-expression/m-p/12450#M2035</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2018-02-26T13:36:33Z</dc:date>
    </item>
    <item>
      <title>Re: How can I turn my Count (Distinct If into a set expression?</title>
      <link>https://community.qlik.com/t5/QlikView/How-can-I-turn-my-Count-Distinct-If-into-a-set-expression/m-p/12451#M2036</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Exactly what I needed &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt; thanks Sunny.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Feb 2018 13:39:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-can-I-turn-my-Count-Distinct-If-into-a-set-expression/m-p/12451#M2036</guid>
      <dc:creator>robinwiman</dc:creator>
      <dc:date>2018-02-26T13:39:29Z</dc:date>
    </item>
  </channel>
</rss>

