<?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: Aggregate and count function in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Aggregate-and-count-function/m-p/1541243#M39059</link>
    <description>&lt;P&gt;Could you give me your email and I'll share my .qvf file from cloud.&lt;/P&gt;&lt;P&gt;if not. The data:&lt;/P&gt;&lt;PRE&gt;Actions:
LOAD * Inline [
"User Sys ID","Start Date",S
8,1/24/2014,0
8,1/24/2014,3
9,7/1/2013,3
9,6/12/2016,1
9,12/10/2016,3
13,5/1/2014,3
13,7/1/2015,3
13,11/1/2015,3
13,11/25/2015,3
13,7/1/2016,0
13,7/1/2016,3
90,1/1/2014,3
90,4/10/2017,0
];&lt;/PRE&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
    <pubDate>Thu, 07 Feb 2019 22:50:08 GMT</pubDate>
    <dc:creator>danimelo1</dc:creator>
    <dc:date>2019-02-07T22:50:08Z</dc:date>
    <item>
      <title>Aggregate and count function</title>
      <link>https://community.qlik.com/t5/App-Development/Aggregate-and-count-function/m-p/1538633#M38888</link>
      <description>&lt;P&gt;Hi experts,&lt;/P&gt;&lt;P&gt;From the table above, I want to count the number of active members. I'm trying with this expression but seems it doesn't works in my KPI label:&lt;/P&gt;&lt;P&gt;=aggr(count{&amp;lt;[S]={'3'}&amp;gt;}(max(date([Start Date]))distinct [User Sys ID]),[User Sys ID])&lt;/P&gt;&lt;P&gt;This is my table:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2019-02-01 at 20.58.19.png" style="width: 882px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/5063iDB79D48C36866618/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2019-02-01 at 20.58.19.png" alt="Screenshot 2019-02-01 at 20.58.19.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;The count should be equal to 2 (User 8 and 9). The tricky part is that if a User Sys ID has S=3 in the last start date, it is an active user.&lt;/P&gt;&lt;P&gt;I think &lt;A href="https://community.qlik.com/t5/New-to-QlikView/Count-results-of-Aggr-function/td-p/774285" target="_blank"&gt;this&lt;/A&gt; is a good approach but I can't figure out how to implement it.&lt;/P&gt;&lt;P&gt;Any idea?&lt;/P&gt;</description>
      <pubDate>Fri, 01 Feb 2019 20:04:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Aggregate-and-count-function/m-p/1538633#M38888</guid>
      <dc:creator>danimelo1</dc:creator>
      <dc:date>2019-02-01T20:04:39Z</dc:date>
    </item>
    <item>
      <title>Re: Aggregate and count function</title>
      <link>https://community.qlik.com/t5/App-Development/Aggregate-and-count-function/m-p/1538674#M38892</link>
      <description>May be this you are looking for:&lt;BR /&gt;&lt;BR /&gt;=Count(aggr(max({&amp;lt;[S]={'3'}&amp;gt;} date([Start Date]), [User Sys ID]) DISTINCT [User Sys ID])</description>
      <pubDate>Sat, 02 Feb 2019 04:46:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Aggregate-and-count-function/m-p/1538674#M38892</guid>
      <dc:creator>vishsaggi</dc:creator>
      <dc:date>2019-02-02T04:46:32Z</dc:date>
    </item>
    <item>
      <title>Re: Aggregate and count function</title>
      <link>https://community.qlik.com/t5/App-Development/Aggregate-and-count-function/m-p/1538703#M38894</link>
      <description>&lt;P&gt;Didi you mean this: =Count(aggr(max({&amp;lt;[S]={'3'}&amp;gt;} date([Start Date])), [User Sys ID]))&lt;/P&gt;&lt;P&gt;In your answer there is something wrong: Aggr needs 2 values and one ')' is missing.&lt;/P&gt;&lt;P&gt;Anyway, didn'r work&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 02 Feb 2019 12:32:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Aggregate-and-count-function/m-p/1538703#M38894</guid>
      <dc:creator>danimelo1</dc:creator>
      <dc:date>2019-02-02T12:32:26Z</dc:date>
    </item>
    <item>
      <title>Re: Aggregate and count function</title>
      <link>https://community.qlik.com/t5/App-Development/Aggregate-and-count-function/m-p/1538720#M38895</link>
      <description>Probably missed a bracket. So can you share some sample data with expected output, then i can work on it.</description>
      <pubDate>Sat, 02 Feb 2019 17:08:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Aggregate-and-count-function/m-p/1538720#M38895</guid>
      <dc:creator>vishsaggi</dc:creator>
      <dc:date>2019-02-02T17:08:28Z</dc:date>
    </item>
    <item>
      <title>Re: Aggregate and count function</title>
      <link>https://community.qlik.com/t5/App-Development/Aggregate-and-count-function/m-p/1538738#M38896</link>
      <description>&lt;P&gt;Example data:&lt;/P&gt;&lt;P&gt;Actions:&lt;BR /&gt;LOAD * Inline [&lt;BR /&gt;"User Sys ID","Start Date",S&lt;BR /&gt;8,1/24/2014,0&lt;BR /&gt;8,1/24/2014,3&lt;BR /&gt;9,7/1/2013,3&lt;BR /&gt;9,6/12/2016,1&lt;BR /&gt;9,12/10/2016,3&lt;BR /&gt;90,1/1/2014,3&lt;BR /&gt;90,4/10/2017,0&lt;BR /&gt;];&lt;/P&gt;&lt;P&gt;The expexted output:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2019-02-02 at 22.30.25.png" style="width: 170px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/5084iA956B706803238B2/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2019-02-02 at 22.30.25.png" alt="Screenshot 2019-02-02 at 22.30.25.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;</description>
      <pubDate>Sat, 02 Feb 2019 21:31:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Aggregate-and-count-function/m-p/1538738#M38896</guid>
      <dc:creator>danimelo1</dc:creator>
      <dc:date>2019-02-02T21:31:42Z</dc:date>
    </item>
    <item>
      <title>Re: Aggregate and count function</title>
      <link>https://community.qlik.com/t5/App-Development/Aggregate-and-count-function/m-p/1538881#M38902</link>
      <description>Not sure if there is another good way of writing this but you can try below:&lt;BR /&gt;&lt;BR /&gt;= Sum({&amp;lt;SVal = {3} &amp;gt;}If(Aggr(Count(Aggr(max([Start Date]), [User Sys ID])), [User Sys ID]) = 1, 1))</description>
      <pubDate>Mon, 04 Feb 2019 04:11:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Aggregate-and-count-function/m-p/1538881#M38902</guid>
      <dc:creator>vishsaggi</dc:creator>
      <dc:date>2019-02-04T04:11:09Z</dc:date>
    </item>
    <item>
      <title>Re: Aggregate and count function</title>
      <link>https://community.qlik.com/t5/App-Development/Aggregate-and-count-function/m-p/1540997#M39031</link>
      <description>&lt;P&gt;Not working.&lt;/P&gt;</description>
      <pubDate>Thu, 07 Feb 2019 14:40:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Aggregate-and-count-function/m-p/1540997#M39031</guid>
      <dc:creator>danimelo1</dc:creator>
      <dc:date>2019-02-07T14:40:53Z</dc:date>
    </item>
    <item>
      <title>Re: Aggregate and count function</title>
      <link>https://community.qlik.com/t5/App-Development/Aggregate-and-count-function/m-p/1541009#M39033</link>
      <description>Can you share a qvw file or a sample data file and highlight where it is not working. With the sample data set you provided it works at my end with that expression.</description>
      <pubDate>Thu, 07 Feb 2019 14:50:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Aggregate-and-count-function/m-p/1541009#M39033</guid>
      <dc:creator>vishsaggi</dc:creator>
      <dc:date>2019-02-07T14:50:25Z</dc:date>
    </item>
    <item>
      <title>Re: Aggregate and count function</title>
      <link>https://community.qlik.com/t5/App-Development/Aggregate-and-count-function/m-p/1541243#M39059</link>
      <description>&lt;P&gt;Could you give me your email and I'll share my .qvf file from cloud.&lt;/P&gt;&lt;P&gt;if not. The data:&lt;/P&gt;&lt;PRE&gt;Actions:
LOAD * Inline [
"User Sys ID","Start Date",S
8,1/24/2014,0
8,1/24/2014,3
9,7/1/2013,3
9,6/12/2016,1
9,12/10/2016,3
13,5/1/2014,3
13,7/1/2015,3
13,11/1/2015,3
13,11/25/2015,3
13,7/1/2016,0
13,7/1/2016,3
90,1/1/2014,3
90,4/10/2017,0
];&lt;/PRE&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Thu, 07 Feb 2019 22:50:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Aggregate-and-count-function/m-p/1541243#M39059</guid>
      <dc:creator>danimelo1</dc:creator>
      <dc:date>2019-02-07T22:50:08Z</dc:date>
    </item>
    <item>
      <title>Re: Aggregate and count function</title>
      <link>https://community.qlik.com/t5/App-Development/Aggregate-and-count-function/m-p/1541245#M39060</link>
      <description>my email: vishnoreply2017@gmail.com</description>
      <pubDate>Thu, 07 Feb 2019 23:02:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Aggregate-and-count-function/m-p/1541245#M39060</guid>
      <dc:creator>vishsaggi</dc:creator>
      <dc:date>2019-02-07T23:02:15Z</dc:date>
    </item>
    <item>
      <title>Re: Aggregate and count function</title>
      <link>https://community.qlik.com/t5/App-Development/Aggregate-and-count-function/m-p/1541268#M39062</link>
      <description>&lt;P&gt;Can you try this?&lt;BR /&gt;Actions:&lt;BR /&gt;LOAD * Inline [&lt;BR /&gt;"User Sys ID","Start Date",S&lt;BR /&gt;8,1/24/2014,0&lt;BR /&gt;8,1/24/2014,3&lt;BR /&gt;9,7/1/2013,3&lt;BR /&gt;9,6/12/2016,1&lt;BR /&gt;9,12/10/2016,3&lt;BR /&gt;13,5/1/2014,3&lt;BR /&gt;13,7/1/2015,3&lt;BR /&gt;13,11/1/2015,3&lt;BR /&gt;13,11/25/2015,3&lt;BR /&gt;13,7/1/2016,0&lt;BR /&gt;13,7/1/2016,3&lt;BR /&gt;90,1/1/2014,3&lt;BR /&gt;90,4/10/2017,0&lt;BR /&gt;];&lt;BR /&gt;&lt;BR /&gt;LEFT JOIN(Actions)&lt;BR /&gt;LOAD [User Sys ID],&lt;BR /&gt;Date(Max([Start Date])) AS MaxStDt&lt;BR /&gt;Resident Actions&lt;BR /&gt;Group By [User Sys ID];&lt;BR /&gt;&lt;BR /&gt;In your chart add [User sys ID] as dimension and expression as&lt;BR /&gt;= Sum(If(S = 3 and [Start Date] = MaxStDt,1, 0))&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 08 Feb 2019 04:22:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Aggregate-and-count-function/m-p/1541268#M39062</guid>
      <dc:creator>vishsaggi</dc:creator>
      <dc:date>2019-02-08T04:22:14Z</dc:date>
    </item>
  </channel>
</rss>

