<?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 of Distinct IDFIELD Aggregate problem.. in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Count-of-Distinct-IDFIELD-Aggregate-problem/m-p/467485#M1163893</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry I locked it as it was the month I had used throughout the example. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your solution provides the expected answer (2140) but only when Oct 2011 is selected which is very confusing. When I unlock the date field it changes to 247 in Oct 2011 which doesn't make sense to me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks again for your continued support. I am learning more about set analysis thanks to you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 27 Nov 2012 13:59:43 GMT</pubDate>
    <dc:creator>felix18807</dc:creator>
    <dc:date>2012-11-27T13:59:43Z</dc:date>
    <item>
      <title>Count of Distinct IDFIELD Aggregate problem..</title>
      <link>https://community.qlik.com/t5/QlikView/Count-of-Distinct-IDFIELD-Aggregate-problem/m-p/467478#M1163886</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I want to count the distinct IDField where the count of lines having a flag A or B is less than 5.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 10pt;"&gt;I tried this but this is obviously wrong...&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Count(&lt;SPAN style="color: #0000ff;"&gt;Distinct&lt;/SPAN&gt; &lt;SPAN style="color: #0000ff;"&gt;if&lt;/SPAN&gt;(&lt;SPAN style="color: #0000ff;"&gt;Sum&lt;/SPAN&gt;(&lt;SPAN style="color: #0000ff;"&gt;if&lt;/SPAN&gt;(&lt;SPAN style="color: #800000;"&gt;FLAG&lt;/SPAN&gt;='A' &lt;SPAN style="color: #0000ff;"&gt;or&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;FLAG&lt;/SPAN&gt;='B',))&amp;lt;5,&lt;SPAN style="color: #ff0000;"&gt;IDField&lt;/SPAN&gt;)) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 10pt;"&gt;Do I need to use the AGGR function&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Nov 2012 16:26:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-of-Distinct-IDFIELD-Aggregate-problem/m-p/467478#M1163886</guid>
      <dc:creator>felix18807</dc:creator>
      <dc:date>2012-11-26T16:26:59Z</dc:date>
    </item>
    <item>
      <title>Re: Count of Distinct IDFIELD Aggregate problem..</title>
      <link>https://community.qlik.com/t5/QlikView/Count-of-Distinct-IDFIELD-Aggregate-problem/m-p/467479#M1163887</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think you can try like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Count({&amp;lt;IDField = {"=Count&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;({&amp;lt;&lt;SPAN style="color: #800000;"&gt;FLAG &lt;/SPAN&gt;={'A','B'} &amp;gt;} FLAG)&amp;lt;5&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;"}&amp;gt;} &lt;SPAN style="color: #0000ff;"&gt;Distinct&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;IDField&lt;/SPAN&gt;)&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Nov 2012 16:32:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-of-Distinct-IDFIELD-Aggregate-problem/m-p/467479#M1163887</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2012-11-26T16:32:01Z</dc:date>
    </item>
    <item>
      <title>Re: Count of Distinct IDFIELD Aggregate problem..</title>
      <link>https://community.qlik.com/t5/QlikView/Count-of-Distinct-IDFIELD-Aggregate-problem/m-p/467480#M1163888</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;Try like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Count(&lt;SPAN style="color: #0000ff;"&gt;Distinct&lt;/SPAN&gt; &lt;SPAN style="color: #0000ff;"&gt;if&lt;/SPAN&gt;(&lt;SPAN style="color: #0000ff;"&gt;Sum&lt;/SPAN&gt;(&lt;SPAN style="color: #0000ff;"&gt;if&lt;/SPAN&gt;(&lt;SPAN style="color: #800000;"&gt;FLAG&lt;/SPAN&gt;='A' &lt;SPAN style="color: #0000ff;"&gt;or&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;FLAG&lt;/SPAN&gt;='B',1))&amp;lt;5,&lt;SPAN style="color: #ff0000;"&gt;IDField&lt;/SPAN&gt;)) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;or in set analysis&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Count({&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #ff0000; font-size: 10pt;"&gt;IDField &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;= {"=Count&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;({&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 10pt;"&gt;FLAG&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;={'A','B'} &amp;gt;} &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 10pt;"&gt;FLAG&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;)&amp;lt;5&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;"}&amp;gt;} &lt;SPAN style="color: #0000ff;"&gt;Distinct&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;IDField&lt;/SPAN&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Refer set analysis for better performance&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Hope it helps&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Nov 2012 17:05:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-of-Distinct-IDFIELD-Aggregate-problem/m-p/467480#M1163888</guid>
      <dc:creator>MayilVahanan</dc:creator>
      <dc:date>2012-11-26T17:05:03Z</dc:date>
    </item>
    <item>
      <title>Re: Count of Distinct IDFIELD Aggregate problem..</title>
      <link>https://community.qlik.com/t5/QlikView/Count-of-Distinct-IDFIELD-Aggregate-problem/m-p/467481#M1163889</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for the replies. I haven't tried this use of set analysis before and it has been very inciteful to see your answers.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am still not getting to the value I need but I suspect that this is due to my poor explanation of the problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please see the attached file which I hope better demonstrates my dilema.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Nov 2012 10:27:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-of-Distinct-IDFIELD-Aggregate-problem/m-p/467481#M1163889</guid>
      <dc:creator>felix18807</dc:creator>
      <dc:date>2012-11-27T10:27:12Z</dc:date>
    </item>
    <item>
      <title>Re: Count of Distinct IDFIELD Aggregate problem..</title>
      <link>https://community.qlik.com/t5/QlikView/Count-of-Distinct-IDFIELD-Aggregate-problem/m-p/467482#M1163890</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;STRONG&gt;=Count({&amp;lt;[ID 2] = {"=Count({&amp;lt;FLAG ={'I',1} &amp;gt;} FLAG)&amp;lt;=5"}&amp;gt;}&amp;nbsp; [ID 2])&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i.e. remove the distinct qualifier from the count and check smaller equal (&amp;lt;=5) in the advanced search.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Nov 2012 10:58:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-of-Distinct-IDFIELD-Aggregate-problem/m-p/467482#M1163890</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2012-11-27T10:58:32Z</dc:date>
    </item>
    <item>
      <title>Re: Count of Distinct IDFIELD Aggregate problem..</title>
      <link>https://community.qlik.com/t5/QlikView/Count-of-Distinct-IDFIELD-Aggregate-problem/m-p/467483#M1163891</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Unfortunately this seems to behave unusually when factoring in the MonthYear dimension. My inability to explain what I need to achieve is at fault here. I'm very sorry.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Nov 2012 13:16:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-of-Distinct-IDFIELD-Aggregate-problem/m-p/467483#M1163891</guid>
      <dc:creator>felix18807</dc:creator>
      <dc:date>2012-11-27T13:16:34Z</dc:date>
    </item>
    <item>
      <title>Re: Count of Distinct IDFIELD Aggregate problem..</title>
      <link>https://community.qlik.com/t5/QlikView/Count-of-Distinct-IDFIELD-Aggregate-problem/m-p/467484#M1163892</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;&lt;/P&gt;&lt;P&gt;=Count({&amp;lt;[ID 2] = {"=Count({&amp;lt;FLAG ={'I',1} &amp;gt;} FLAG)&amp;lt;=5"}&lt;STRONG&gt;, FLAG = {'I',1}&lt;/STRONG&gt;&amp;gt;}&amp;nbsp; [ID 2])&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Btw, I was not able to remove the selection in YearMonth, have you changed any settings to achieve this?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Nov 2012 13:45:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-of-Distinct-IDFIELD-Aggregate-problem/m-p/467484#M1163892</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2012-11-27T13:45:55Z</dc:date>
    </item>
    <item>
      <title>Re: Count of Distinct IDFIELD Aggregate problem..</title>
      <link>https://community.qlik.com/t5/QlikView/Count-of-Distinct-IDFIELD-Aggregate-problem/m-p/467485#M1163893</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry I locked it as it was the month I had used throughout the example. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your solution provides the expected answer (2140) but only when Oct 2011 is selected which is very confusing. When I unlock the date field it changes to 247 in Oct 2011 which doesn't make sense to me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks again for your continued support. I am learning more about set analysis thanks to you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Nov 2012 13:59:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-of-Distinct-IDFIELD-Aggregate-problem/m-p/467485#M1163893</guid>
      <dc:creator>felix18807</dc:creator>
      <dc:date>2012-11-27T13:59:43Z</dc:date>
    </item>
    <item>
      <title>Re: Count of Distinct IDFIELD Aggregate problem..</title>
      <link>https://community.qlik.com/t5/QlikView/Count-of-Distinct-IDFIELD-Aggregate-problem/m-p/467486#M1163894</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ah sure, locking. It seems I never use this option &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think it does make sense since selecting in YearMonth does affect the advanced search, the count of FLAG and comparing to &amp;lt;=5. What is your requirement here? &lt;/P&gt;&lt;P&gt;I don't have much time right now, maybe I can look into this tomorrow.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Nov 2012 14:19:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-of-Distinct-IDFIELD-Aggregate-problem/m-p/467486#M1163894</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2012-11-27T14:19:54Z</dc:date>
    </item>
    <item>
      <title>Re: Count of Distinct IDFIELD Aggregate problem..</title>
      <link>https://community.qlik.com/t5/QlikView/Count-of-Distinct-IDFIELD-Aggregate-problem/m-p/467487#M1163895</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Any time you can give me is massively appreciated as I am lost on this requirement! &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt; I am very grateful for the help you've given.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It's hard for me trying to relay exactly what I am looking for but here goes. I need a count of lines per MonthYear that have the I or 1 FLAG but ONLY where the count of lines (FLAG =I or 1) for the MonthYear/ ID &amp;lt;=5.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have retreated to Excel in order to get some validation values and I believe that for Oct 2011 the figure should be 2140.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It is a very confusing requirement for me but this is what my manager wants to achieve so I'm stuck &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/sad.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Nov 2012 14:43:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-of-Distinct-IDFIELD-Aggregate-problem/m-p/467487#M1163895</guid>
      <dc:creator>felix18807</dc:creator>
      <dc:date>2012-11-27T14:43:00Z</dc:date>
    </item>
  </channel>
</rss>

