<?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: Distinct count of customer based on latest date in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Distinct-count-of-customer-based-on-latest-date/m-p/99017#M6587</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this &lt;/P&gt;&lt;P style="color: #575757; font-family: arial, helvetica, sans-serif; font-size: 13.3333330154419px; font-style: normal; font-weight: normal; text-align: left; text-indent: 0px;"&gt;sum({&amp;lt; STATUS={'Y'} &amp;gt;}&lt;/P&gt;&lt;P style="color: #575757; font-family: arial, helvetica, sans-serif; font-size: 13.3333330154419px; font-style: normal; font-weight: normal; text-align: left; text-indent: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(TXN_DT_ID = Aggr(Max({&amp;lt; STATUS= &amp;gt;} TOTAL &amp;lt;CUST_ID&amp;gt; TXN_DT_ID ), CUST_ID), 1, 0)&lt;/P&gt;&lt;P style="color: #575757; font-family: arial, helvetica, sans-serif; font-size: 13.3333330154419px; font-style: normal; font-weight: normal; text-align: left; text-indent: 0px;"&gt;) &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 20 Aug 2018 18:43:13 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2018-08-20T18:43:13Z</dc:date>
    <item>
      <title>Distinct count of customer based on latest date</title>
      <link>https://community.qlik.com/t5/App-Development/Distinct-count-of-customer-based-on-latest-date/m-p/99016#M6586</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&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-size: 10pt; font-family: inherit; color: #575757;"&gt;Hi, all&lt;/SPAN&gt;&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'm here with some issue in set analysis.&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Imagine I want the following table.&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;TABLE border="0" cellpadding="0" cellspacing="0" width="303"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl66" height="20" style="font-size: 11pt; color: white; font-weight: bold; font-family: Calibri, sans-serif; border: 0.5pt solid windowtext; background: #4472c4;" width="74"&gt;CUST_ID&lt;/TD&gt;&lt;TD class="xl67" style="font-size: 11pt; color: white; font-weight: bold; font-family: Calibri, sans-serif; border: 0.5pt solid windowtext; background: #4472c4;" width="90"&gt;TXN_DT_ID&lt;/TD&gt;&lt;TD class="xl67" style="font-size: 11pt; color: white; font-weight: bold; font-family: Calibri, sans-serif; border: 0.5pt solid windowtext; background: #4472c4;" width="69"&gt;STATUS&lt;/TD&gt;&lt;TD class="xl68" style="font-size: 11pt; color: white; font-weight: bold; font-family: Calibri, sans-serif; border: 0.5pt solid windowtext; background: #4472c4;" width="70"&gt;Remark&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl69" height="20" style="font-size: 11pt; color: black; font-family: Calibri, sans-serif; border: 0.5pt solid windowtext; background: yellow;"&gt;A&lt;/TD&gt;&lt;TD align="right" class="xl70" style="font-size: 11pt; color: black; font-family: Calibri, sans-serif; border: 0.5pt solid windowtext; background: yellow;"&gt;20180802&lt;/TD&gt;&lt;TD class="xl70" style="font-size: 11pt; color: black; font-family: Calibri, sans-serif; border: 0.5pt solid windowtext; background: yellow;"&gt;N&lt;/TD&gt;&lt;TD class="xl71" style="font-size: 11pt; color: black; font-family: Calibri, sans-serif; border: 0.5pt solid windowtext; background: #d9e1f2;"&gt;Excluded&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl72" height="20" style="font-size: 11pt; color: black; font-family: Calibri, sans-serif; border: 0.5pt solid windowtext;"&gt;A&lt;/TD&gt;&lt;TD align="right" class="xl65" style="font-size: 11pt; color: black; font-family: Calibri, sans-serif; border: 0.5pt solid windowtext;"&gt;20180731&lt;/TD&gt;&lt;TD class="xl65" style="font-size: 11pt; color: black; font-family: Calibri, sans-serif; border: 0.5pt solid windowtext;"&gt;Y&lt;/TD&gt;&lt;TD class="xl71" style="font-size: 11pt; color: black; font-family: Calibri, sans-serif; border: 0.5pt solid windowtext;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl69" height="20" style="font-size: 11pt; color: black; font-family: Calibri, sans-serif; border: 0.5pt solid windowtext; background: yellow;"&gt;B&lt;/TD&gt;&lt;TD align="right" class="xl70" style="font-size: 11pt; color: black; font-family: Calibri, sans-serif; border: 0.5pt solid windowtext; background: yellow;"&gt;20180630&lt;/TD&gt;&lt;TD class="xl70" style="font-size: 11pt; color: black; font-family: Calibri, sans-serif; border: 0.5pt solid windowtext; background: yellow;"&gt;Y&lt;/TD&gt;&lt;TD class="xl71" style="font-size: 11pt; color: black; font-family: Calibri, sans-serif; border: 0.5pt solid windowtext; background: #d9e1f2;"&gt;Included&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl72" height="20" style="font-size: 11pt; color: black; font-family: Calibri, sans-serif; border: 0.5pt solid windowtext;"&gt;C&lt;/TD&gt;&lt;TD align="right" class="xl65" style="font-size: 11pt; color: black; font-family: Calibri, sans-serif; border: 0.5pt solid windowtext;"&gt;20180801&lt;/TD&gt;&lt;TD class="xl65" style="font-size: 11pt; color: black; font-family: Calibri, sans-serif; border: 0.5pt solid windowtext;"&gt;Y&lt;/TD&gt;&lt;TD class="xl71" style="font-size: 11pt; color: black; font-family: Calibri, sans-serif; border: 0.5pt solid windowtext;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl72" height="20" style="font-size: 11pt; color: black; font-family: Calibri, sans-serif; border: 0.5pt solid windowtext; background: #d9e1f2;"&gt;C&lt;/TD&gt;&lt;TD align="right" class="xl65" style="font-size: 11pt; color: black; font-family: Calibri, sans-serif; border: 0.5pt solid windowtext; background: #d9e1f2;"&gt;20180730&lt;/TD&gt;&lt;TD class="xl65" style="font-size: 11pt; color: black; font-family: Calibri, sans-serif; border: 0.5pt solid windowtext; background: #d9e1f2;"&gt;N&lt;/TD&gt;&lt;TD class="xl71" style="font-size: 11pt; color: black; font-family: Calibri, sans-serif; border: 0.5pt solid windowtext; background: #d9e1f2;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl69" height="20" style="font-size: 11pt; color: black; font-family: Calibri, sans-serif; border: 0.5pt solid windowtext; background: yellow;"&gt;C&lt;/TD&gt;&lt;TD align="right" class="xl70" style="font-size: 11pt; color: black; font-family: Calibri, sans-serif; border: 0.5pt solid windowtext; background: yellow;"&gt;20180804&lt;/TD&gt;&lt;TD class="xl70" style="font-size: 11pt; color: black; font-family: Calibri, sans-serif; border: 0.5pt solid windowtext; background: yellow;"&gt;N&lt;/TD&gt;&lt;TD class="xl71" style="font-size: 11pt; color: black; font-family: Calibri, sans-serif; border: 0.5pt solid windowtext;"&gt;Excluded&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl69" height="20" style="font-size: 11pt; color: black; font-family: Calibri, sans-serif; border: 0.5pt solid windowtext; background: yellow;"&gt;D&lt;/TD&gt;&lt;TD align="right" class="xl70" style="font-size: 11pt; color: black; font-family: Calibri, sans-serif; border: 0.5pt solid windowtext; background: yellow;"&gt;20180803&lt;/TD&gt;&lt;TD class="xl70" style="font-size: 11pt; color: black; font-family: Calibri, sans-serif; border: 0.5pt solid windowtext; background: yellow;"&gt;Y&lt;/TD&gt;&lt;TD class="xl71" style="font-size: 11pt; color: black; font-family: Calibri, sans-serif; border: 0.5pt solid windowtext; background: #d9e1f2;"&gt;Included&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl72" height="20" style="font-size: 11pt; color: black; font-family: Calibri, sans-serif; border: 0.5pt solid windowtext;"&gt;D&lt;/TD&gt;&lt;TD align="right" class="xl65" style="font-size: 11pt; color: black; font-family: Calibri, sans-serif; border: 0.5pt solid windowtext;"&gt;20180802&lt;/TD&gt;&lt;TD class="xl65" style="font-size: 11pt; color: black; font-family: Calibri, sans-serif; border: 0.5pt solid windowtext;"&gt;N&lt;/TD&gt;&lt;TD class="xl71" style="font-size: 11pt; color: black; font-family: Calibri, sans-serif; border: 0.5pt solid windowtext;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl72" height="20" style="font-size: 11pt; color: black; font-family: Calibri, sans-serif; border: 0.5pt solid windowtext; background: #d9e1f2;"&gt;D&lt;/TD&gt;&lt;TD align="right" class="xl65" style="font-size: 11pt; color: black; font-family: Calibri, sans-serif; border: 0.5pt solid windowtext; background: #d9e1f2;"&gt;20180801&lt;/TD&gt;&lt;TD class="xl65" style="font-size: 11pt; color: black; font-family: Calibri, sans-serif; border: 0.5pt solid windowtext; background: #d9e1f2;"&gt;N&lt;/TD&gt;&lt;TD class="xl71" style="font-size: 11pt; color: black; font-family: Calibri, sans-serif; border: 0.5pt solid windowtext; background: #d9e1f2;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl73" height="20" style="font-size: 11pt; color: black; font-family: Calibri, sans-serif; border: 0.5pt solid windowtext;"&gt;D&lt;/TD&gt;&lt;TD align="right" class="xl74" style="font-size: 11pt; color: black; font-family: Calibri, sans-serif; border: 0.5pt solid windowtext;"&gt;20180731&lt;/TD&gt;&lt;TD class="xl74" style="font-size: 11pt; color: black; font-family: Calibri, sans-serif; border: 0.5pt solid windowtext;"&gt;N&lt;/TD&gt;&lt;TD class="xl75" style="font-size: 11pt; color: black; font-family: Calibri, sans-serif; border: 0.5pt solid windowtext;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;To calculate the distinct count of customer with Status='Y' based on the latest date of each customer only. Based on the data above, my expected result should be 2.&lt;/SPAN&gt;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My set analysis, which is wrong somewhere :&lt;/P&gt;&lt;P&gt;count(Aggr(max(If(TXN_DT_ID = FirstSortedValue(TOTAL &amp;lt;CUST_ID&amp;gt; TXN_DT_ID), if(STATUS='Y',CUST_ID))), CUST_ID))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyone can help on the set analysis?&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;Thanks in advance.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Dec 2021 15:42:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Distinct-count-of-customer-based-on-latest-date/m-p/99016#M6586</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-12-22T15:42:54Z</dc:date>
    </item>
    <item>
      <title>Re: Distinct count of customer based on latest date</title>
      <link>https://community.qlik.com/t5/App-Development/Distinct-count-of-customer-based-on-latest-date/m-p/99017#M6587</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this &lt;/P&gt;&lt;P style="color: #575757; font-family: arial, helvetica, sans-serif; font-size: 13.3333330154419px; font-style: normal; font-weight: normal; text-align: left; text-indent: 0px;"&gt;sum({&amp;lt; STATUS={'Y'} &amp;gt;}&lt;/P&gt;&lt;P style="color: #575757; font-family: arial, helvetica, sans-serif; font-size: 13.3333330154419px; font-style: normal; font-weight: normal; text-align: left; text-indent: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(TXN_DT_ID = Aggr(Max({&amp;lt; STATUS= &amp;gt;} TOTAL &amp;lt;CUST_ID&amp;gt; TXN_DT_ID ), CUST_ID), 1, 0)&lt;/P&gt;&lt;P style="color: #575757; font-family: arial, helvetica, sans-serif; font-size: 13.3333330154419px; font-style: normal; font-weight: normal; text-align: left; text-indent: 0px;"&gt;) &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Aug 2018 18:43:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Distinct-count-of-customer-based-on-latest-date/m-p/99017#M6587</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-08-20T18:43:13Z</dc:date>
    </item>
    <item>
      <title>Re: Distinct count of customer based on latest date</title>
      <link>https://community.qlik.com/t5/App-Development/Distinct-count-of-customer-based-on-latest-date/m-p/99018#M6588</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Max, &lt;/P&gt;&lt;P&gt;The value aggregated seems if there're more columns then will be incorrect.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Aug 2018 04:12:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Distinct-count-of-customer-based-on-latest-date/m-p/99018#M6588</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-08-21T04:12:02Z</dc:date>
    </item>
  </channel>
</rss>

