<?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 number of same value clusters in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Count-number-of-same-value-clusters/m-p/1251861#M396071</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Looks great thanks! &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there any way to do this directly in the straight table expression since FieldA is already loaded, without doing another load in the script?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 11 Feb 2017 12:57:30 GMT</pubDate>
    <dc:creator />
    <dc:date>2017-02-11T12:57:30Z</dc:date>
    <item>
      <title>Count number of same value clusters</title>
      <link>https://community.qlik.com/t5/QlikView/Count-number-of-same-value-clusters/m-p/1251857#M396067</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I want to count the number of clusters having a certain value. Ideally as a chart expression but if that's not possible then the load script would be fine.&lt;/P&gt;&lt;P&gt;Ex if I have a table with a Field:&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;A&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;A&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;A&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;B&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;B&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;B&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;B&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;A&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;A&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;B&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;B&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;B&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;A&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;I want to get:&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;A: 3&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;B: 2&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Feb 2017 12:30:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-number-of-same-value-clusters/m-p/1251857#M396067</guid>
      <dc:creator />
      <dc:date>2017-02-10T12:30:00Z</dc:date>
    </item>
    <item>
      <title>Re: Count number of same value clusters</title>
      <link>https://community.qlik.com/t5/QlikView/Count-number-of-same-value-clusters/m-p/1251858#M396068</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I didn't follow you. Can you provide more information. How you are calc. 3 and 2 for A &amp;amp; B&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Feb 2017 16:20:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-number-of-same-value-clusters/m-p/1251858#M396068</guid>
      <dc:creator>Anil_Babu_Samineni</dc:creator>
      <dc:date>2017-02-10T16:20:39Z</dc:date>
    </item>
    <item>
      <title>Re: Count number of same value clusters</title>
      <link>https://community.qlik.com/t5/QlikView/Count-number-of-same-value-clusters/m-p/1251859#M396069</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;A cluster in this case is considered a series of continuous values, and the next cluster starts when the field value changes:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;first cluster: AAA (label A)&lt;/P&gt;&lt;P&gt;Second cluster: BBBB (label B)&lt;/P&gt;&lt;P&gt;Third cluster: AA (label A)&lt;/P&gt;&lt;P&gt;Fourth cluster: BBB (label B)&lt;/P&gt;&lt;P&gt;Fifth cluster: A (label A)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As you can see there are three clusters with type A, and two&amp;nbsp; types B. So instead of counting each single row, I want to see how many "blocks" there are for each type. A simple aggregation does not work in this case. I could add a third cluster below, let's say CCCCCC. Doing so would generate the result:&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;A: 3&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;B: 2&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;C: 1&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Hope this helps clarify.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Feb 2017 19:32:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-number-of-same-value-clusters/m-p/1251859#M396069</guid>
      <dc:creator />
      <dc:date>2017-02-10T19:32:02Z</dc:date>
    </item>
    <item>
      <title>Re: Count number of same value clusters</title>
      <link>https://community.qlik.com/t5/QlikView/Count-number-of-same-value-clusters/m-p/1251860#M396070</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;TableA:&lt;/P&gt;&lt;P&gt;LOAD *, if(FieldA = Previous(FieldA), Peek(Rank), RowNo()) as Rank&amp;nbsp; INLINE [&lt;/P&gt;&lt;P&gt;FieldA&lt;/P&gt;&lt;P&gt;A&lt;/P&gt;&lt;P&gt;A&lt;/P&gt;&lt;P&gt;A&lt;/P&gt;&lt;P&gt;B&lt;/P&gt;&lt;P&gt;B&lt;/P&gt;&lt;P&gt;B&lt;/P&gt;&lt;P&gt;B&lt;/P&gt;&lt;P&gt;A&lt;/P&gt;&lt;P&gt;A&lt;/P&gt;&lt;P&gt;B&lt;/P&gt;&lt;P&gt;B&lt;/P&gt;&lt;P&gt;B&lt;/P&gt;&lt;P&gt;A&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Add a straight table. &lt;/P&gt;&lt;P&gt;Dim: FieldA&lt;/P&gt;&lt;P&gt;Expr: Count(Distinct Rank)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Feb 2017 21:37:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-number-of-same-value-clusters/m-p/1251860#M396070</guid>
      <dc:creator>vishsaggi</dc:creator>
      <dc:date>2017-02-10T21:37:22Z</dc:date>
    </item>
    <item>
      <title>Re: Count number of same value clusters</title>
      <link>https://community.qlik.com/t5/QlikView/Count-number-of-same-value-clusters/m-p/1251861#M396071</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Looks great thanks! &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there any way to do this directly in the straight table expression since FieldA is already loaded, without doing another load in the script?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Feb 2017 12:57:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-number-of-same-value-clusters/m-p/1251861#M396071</guid>
      <dc:creator />
      <dc:date>2017-02-11T12:57:30Z</dc:date>
    </item>
  </channel>
</rss>

