<?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 Exclude values from count with set analysis in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Exclude-values-from-count-with-set-analysis/m-p/854322#M299486</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a some id numbers that I want to count to do something with that value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But I do not want to count every values, only the ones, that the third digit is different from '7'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have these ids:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;0570035&lt;/P&gt;&lt;P&gt;0530065&lt;/P&gt;&lt;P&gt;0550099&lt;/P&gt;&lt;P&gt;0560016&lt;/P&gt;&lt;P&gt;0510015&lt;/P&gt;&lt;P&gt;0570010&lt;/P&gt;&lt;P&gt;0520040&lt;/P&gt;&lt;P&gt;0580002&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With a normal count -&amp;gt; count(ID) I get 8&lt;/P&gt;&lt;P&gt;But I want to exclude 0570035 and 0570010, so that I have a count of 6.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For this I am making the following set analysis -&amp;gt; count({ID&amp;lt;mid(ID,3,1)&amp;gt;}ID).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And it is not working because I do not know how to integrate a function like the MID with the set analysis.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anyone help?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ivo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 17 Apr 2015 06:26:17 GMT</pubDate>
    <dc:creator />
    <dc:date>2015-04-17T06:26:17Z</dc:date>
    <item>
      <title>Exclude values from count with set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Exclude-values-from-count-with-set-analysis/m-p/854322#M299486</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a some id numbers that I want to count to do something with that value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But I do not want to count every values, only the ones, that the third digit is different from '7'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have these ids:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;0570035&lt;/P&gt;&lt;P&gt;0530065&lt;/P&gt;&lt;P&gt;0550099&lt;/P&gt;&lt;P&gt;0560016&lt;/P&gt;&lt;P&gt;0510015&lt;/P&gt;&lt;P&gt;0570010&lt;/P&gt;&lt;P&gt;0520040&lt;/P&gt;&lt;P&gt;0580002&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With a normal count -&amp;gt; count(ID) I get 8&lt;/P&gt;&lt;P&gt;But I want to exclude 0570035 and 0570010, so that I have a count of 6.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For this I am making the following set analysis -&amp;gt; count({ID&amp;lt;mid(ID,3,1)&amp;gt;}ID).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And it is not working because I do not know how to integrate a function like the MID with the set analysis.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anyone help?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ivo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Apr 2015 06:26:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Exclude-values-from-count-with-set-analysis/m-p/854322#M299486</guid>
      <dc:creator />
      <dc:date>2015-04-17T06:26:17Z</dc:date>
    </item>
    <item>
      <title>Re: Exclude values from count with set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Exclude-values-from-count-with-set-analysis/m-p/854323#M299487</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ivo,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;why so complicated?&lt;/P&gt;&lt;P&gt;For a normal COUNT, I think you do not need Set_analysis.&lt;/P&gt;&lt;P&gt;You can use the Index function to find out whether the digit '7' is somewhere in your field (Index() will return 0 if the digit was not found)&lt;/P&gt;&lt;P&gt;Try like&lt;/P&gt;&lt;P&gt;&amp;gt;&amp;gt; COUNT(IF(Index([ID], '7')=0, ID)) &amp;lt;&amp;lt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HTH&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;P.S.: Of course you can also modify the Index() function to look only at the 3rd digit - in case the character '7' is there, INDEX([ID], '7') will return the number 3.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Apr 2015 06:39:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Exclude-values-from-count-with-set-analysis/m-p/854323#M299487</guid>
      <dc:creator>datanibbler</dc:creator>
      <dc:date>2015-04-17T06:39:40Z</dc:date>
    </item>
    <item>
      <title>Re: Exclude values from count with set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Exclude-values-from-count-with-set-analysis/m-p/854324#M299488</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi &lt;/P&gt;&lt;P&gt;if you want to use set analysis for the same &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you need to create a flag in script &lt;/P&gt;&lt;P&gt;mid(ID,3,1) as flag&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the in expression use &lt;/P&gt;&lt;P&gt;=count({&amp;lt;flag-={7}&amp;gt;}ID)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &lt;/P&gt;&lt;P&gt;BKC&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Apr 2015 06:48:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Exclude-values-from-count-with-set-analysis/m-p/854324#M299488</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-04-17T06:48:11Z</dc:date>
    </item>
    <item>
      <title>Re: Exclude values from count with set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Exclude-values-from-count-with-set-analysis/m-p/854325#M299489</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ivo&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The solution with INDEX is a good way&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Another one could be this one :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Count({$&amp;lt;0570035=,0570010=&amp;gt;}ID)&lt;/P&gt;&lt;P&gt;( should count ID removing value 050035 and 050010)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This one should works also :&lt;/P&gt;&lt;P&gt;Count({$&amp;lt;ID-={0570035,0570010}&amp;gt;}ID)&lt;/P&gt;&lt;P&gt;( count ID except ("-=") 0570035,0570010)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it will help&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Bruno&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PS : I personnaly use this link to build ma set analisys, provided by &lt;STRONG&gt;Stefan WALTHER&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://tools.qlikblog.at/SetAnalysisWizard/QlikView-SetAnalysis_Wizard_and_Generator.aspx" title="http://tools.qlikblog.at/SetAnalysisWizard/QlikView-SetAnalysis_Wizard_and_Generator.aspx"&gt;Set Analysis Wizard for QlikView | qlikblog.at&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Apr 2015 06:50:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Exclude-values-from-count-with-set-analysis/m-p/854325#M299489</guid>
      <dc:creator>brunobertels</dc:creator>
      <dc:date>2015-04-17T06:50:12Z</dc:date>
    </item>
    <item>
      <title>Re: Exclude values from count with set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Exclude-values-from-count-with-set-analysis/m-p/854326#M299490</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;nbsp; Hi,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Try this, maybe you can use it,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Greetings Marcellino&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;Data:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;STRONG style="color: #0000ff; font-size: 8pt;"&gt;&lt;STRONG style="color: #0000ff; font-size: 8pt;"&gt;LOAD&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; * &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;inline&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Code, excl,&lt;BR /&gt;0570035,35 &lt;BR /&gt;0530065,65&lt;BR /&gt;0550099,99&lt;BR /&gt;0560016,16&lt;BR /&gt;0510015,15&lt;BR /&gt;0570010,10&lt;BR /&gt;0520040,40&lt;BR /&gt;0580002,02&lt;BR /&gt;]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Count &lt;SPAN style="font-size: 8pt;"&gt;({$&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;excl &lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;-={35,15}&amp;gt;} Code) &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Apr 2015 06:52:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Exclude-values-from-count-with-set-analysis/m-p/854326#M299490</guid>
      <dc:creator>Marcellino_Groothof</dc:creator>
      <dc:date>2015-04-17T06:52:05Z</dc:date>
    </item>
    <item>
      <title>Re: Exclude values from count with set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Exclude-values-from-count-with-set-analysis/m-p/854327#M299491</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;The best option is create a flag in script and use that in Set analysis simply like below&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;*,&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;If(Mid(ID,3,1) &amp;lt;&amp;gt; '7', 1, 0) as Flag&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;FROM DataSource;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Now in front end you can simply use&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Sum(Flag)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;OR &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Count({&amp;lt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Flag={1}&amp;gt;&lt;/SPAN&gt;} ID)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;If you don't want to change the script then use below expression&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Sum(Aggr(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;If(Mid(ID,3,1) &amp;lt;&amp;gt; '7', 1, 0), ID))&lt;/SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Jagan.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Apr 2015 07:05:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Exclude-values-from-count-with-set-analysis/m-p/854327#M299491</guid>
      <dc:creator>jagan</dc:creator>
      <dc:date>2015-04-17T07:05:37Z</dc:date>
    </item>
    <item>
      <title>Re: Exclude values from count with set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Exclude-values-from-count-with-set-analysis/m-p/854328#M299492</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi DataNibbler,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I was making some test with the index function and ended up not using it, but I used the structure you suggested.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I ended up with: &lt;STRONG&gt;count(if(mid(ID,3,1)&amp;lt;&amp;gt;7,ID))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And it works nicely.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for the help!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Apr 2015 07:38:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Exclude-values-from-count-with-set-analysis/m-p/854328#M299492</guid>
      <dc:creator />
      <dc:date>2015-04-17T07:38:32Z</dc:date>
    </item>
  </channel>
</rss>

