<?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: Need cumulative distinct count in bar chart in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Need-cumulative-distinct-count-in-bar-chart/m-p/1306571#M27802</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I believe you need something different because you are doing count distinct. Perhaps some tips here? &lt;A href="https://community.qlik.com/docs/DOC-4252"&gt;Calculating rolling n-period totals, averages or other aggregations&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 05 Jul 2018 18:23:42 GMT</pubDate>
    <dc:creator>Tyler_Waterfall</dc:creator>
    <dc:date>2018-07-05T18:23:42Z</dc:date>
    <item>
      <title>Need cumulative distinct count in bar chart</title>
      <link>https://community.qlik.com/t5/App-Development/Need-cumulative-distinct-count-in-bar-chart/m-p/1306570#M27801</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I want to calculate Policies in Force KPI with the below conditions:&lt;/P&gt;&lt;OL style="list-style-type: decimal;"&gt;&lt;LI&gt;Calendar Date&amp;gt;=Effective Date and &amp;lt;=EndDate for all&amp;nbsp; policies and for each dates throughout&lt;/LI&gt;&lt;LI&gt;It has to be a cumulative view in the bar chart&lt;/LI&gt;&lt;LI&gt;Policies count should be distinct throughout&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;Below is the sample data:&lt;/P&gt;&lt;TABLE border="1" cellpadding="0" cellspacing="0" style="border: none;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD style="border: solid windowtext 1.0pt; padding: 0 5.4pt 0 5.4pt;" valign="top" width="156"&gt;&lt;P style="margin-bottom: .0001pt;"&gt;CalendarDate&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border: solid windowtext 1.0pt; border-left: none; padding: 0 5.4pt 0 5.4pt;" valign="top" width="156"&gt;&lt;P style="margin-bottom: .0001pt;"&gt;PolicyNumber&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border: solid windowtext 1.0pt; border-left: none; padding: 0 5.4pt 0 5.4pt;" valign="top" width="156"&gt;&lt;P style="margin-bottom: .0001pt;"&gt;TransactionEffective Date&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border: solid windowtext 1.0pt; border-left: none; padding: 0 5.4pt 0 5.4pt;" valign="top" width="156"&gt;&lt;P style="margin-bottom: .0001pt;"&gt;TransactionEnd Date&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="border: solid windowtext 1.0pt; border-top: none; padding: 0 5.4pt 0 5.4pt;" valign="top" width="156"&gt;&lt;P style="margin-bottom: .0001pt;"&gt;08/02/2015&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-top: none; border-left: none; border-bottom: solid windowtext 1.0pt; border-right: solid windowtext 1.0pt; padding: 0 5.4pt 0 5.4pt;" valign="top" width="156"&gt;&lt;P style="margin-bottom: .0001pt;"&gt;A1&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-top: none; border-left: none; border-bottom: solid windowtext 1.0pt; border-right: solid windowtext 1.0pt; padding: 0 5.4pt 0 5.4pt;" valign="top" width="156"&gt;&lt;P style="margin-bottom: .0001pt;"&gt;08/02/2015&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-top: none; border-left: none; border-bottom: solid windowtext 1.0pt; border-right: solid windowtext 1.0pt; padding: 0 5.4pt 0 5.4pt;" valign="top" width="156"&gt;&lt;P style="margin-bottom: .0001pt;"&gt;08/02/2015&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="border: solid windowtext 1.0pt; border-top: none; padding: 0 5.4pt 0 5.4pt;" valign="top" width="156"&gt;&lt;P style="margin-bottom: .0001pt;"&gt;08/02/2015&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-top: none; border-left: none; border-bottom: solid windowtext 1.0pt; border-right: solid windowtext 1.0pt; padding: 0 5.4pt 0 5.4pt;" valign="top" width="156"&gt;&lt;P style="margin-bottom: .0001pt;"&gt;A2&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-top: none; border-left: none; border-bottom: solid windowtext 1.0pt; border-right: solid windowtext 1.0pt; padding: 0 5.4pt 0 5.4pt;" valign="top" width="156"&gt;&lt;P style="margin-bottom: .0001pt;"&gt;08/02/2015&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-top: none; border-left: none; border-bottom: solid windowtext 1.0pt; border-right: solid windowtext 1.0pt; padding: 0 5.4pt 0 5.4pt;" valign="top" width="156"&gt;&lt;P style="margin-bottom: .0001pt;"&gt;08/02/2016&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="border: solid windowtext 1.0pt; border-top: none; padding: 0 5.4pt 0 5.4pt;" valign="top" width="156"&gt;&lt;P style="margin-bottom: .0001pt;"&gt;08/02/2015&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-top: none; border-left: none; border-bottom: solid windowtext 1.0pt; border-right: solid windowtext 1.0pt; padding: 0 5.4pt 0 5.4pt;" valign="top" width="156"&gt;&lt;P style="margin-bottom: .0001pt;"&gt;A3&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-top: none; border-left: none; border-bottom: solid windowtext 1.0pt; border-right: solid windowtext 1.0pt; padding: 0 5.4pt 0 5.4pt;" valign="top" width="156"&gt;&lt;P style="margin-bottom: .0001pt;"&gt;08/02/2014&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-top: none; border-left: none; border-bottom: solid windowtext 1.0pt; border-right: solid windowtext 1.0pt; padding: 0 5.4pt 0 5.4pt;" valign="top" width="156"&gt;&lt;P style="margin-bottom: .0001pt;"&gt;08/02/2016&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="border: solid windowtext 1.0pt; border-top: none; padding: 0 5.4pt 0 5.4pt;" valign="top" width="156"&gt;&lt;P style="margin-bottom: .0001pt;"&gt;09/02/2015&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-top: none; border-left: none; border-bottom: solid windowtext 1.0pt; border-right: solid windowtext 1.0pt; padding: 0 5.4pt 0 5.4pt;" valign="top" width="156"&gt;&lt;P style="margin-bottom: .0001pt;"&gt;A4&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-top: none; border-left: none; border-bottom: solid windowtext 1.0pt; border-right: solid windowtext 1.0pt; padding: 0 5.4pt 0 5.4pt;" valign="top" width="156"&gt;&lt;P style="margin-bottom: .0001pt;"&gt;08/02/2015&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-top: none; border-left: none; border-bottom: solid windowtext 1.0pt; border-right: solid windowtext 1.0pt; padding: 0 5.4pt 0 5.4pt;" valign="top" width="156"&gt;&lt;P style="margin-bottom: .0001pt;"&gt;31/12/2017&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="border: solid windowtext 1.0pt; border-top: none; padding: 0 5.4pt 0 5.4pt;" valign="top" width="156"&gt;&lt;P style="margin-bottom: .0001pt;"&gt;10/02/2015&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-top: none; border-left: none; border-bottom: solid windowtext 1.0pt; border-right: solid windowtext 1.0pt; padding: 0 5.4pt 0 5.4pt;" valign="top" width="156"&gt;&lt;P style="margin-bottom: .0001pt;"&gt;A2&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-top: none; border-left: none; border-bottom: solid windowtext 1.0pt; border-right: solid windowtext 1.0pt; padding: 0 5.4pt 0 5.4pt;" valign="top" width="156"&gt;&lt;P style="margin-bottom: .0001pt;"&gt;10/01/2015&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-top: none; border-left: none; border-bottom: solid windowtext 1.0pt; border-right: solid windowtext 1.0pt; padding: 0 5.4pt 0 5.4pt;" valign="top" width="156"&gt;&lt;P style="margin-bottom: .0001pt;"&gt;31/12/2017&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="border: solid windowtext 1.0pt; border-top: none; padding: 0 5.4pt 0 5.4pt;" valign="top" width="156"&gt;&lt;P style="margin-bottom: .0001pt;"&gt;10/02/2015&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-top: none; border-left: none; border-bottom: solid windowtext 1.0pt; border-right: solid windowtext 1.0pt; padding: 0 5.4pt 0 5.4pt;" valign="top" width="156"&gt;&lt;P style="margin-bottom: .0001pt;"&gt;A5&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-top: none; border-left: none; border-bottom: solid windowtext 1.0pt; border-right: solid windowtext 1.0pt; padding: 0 5.4pt 0 5.4pt;" valign="top" width="156"&gt;&lt;P style="margin-bottom: .0001pt;"&gt;07/02/2015&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-top: none; border-left: none; border-bottom: solid windowtext 1.0pt; border-right: solid windowtext 1.0pt; padding: 0 5.4pt 0 5.4pt;" valign="top" width="156"&gt;&lt;P style="margin-bottom: .0001pt;"&gt;31/12/9999&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Below is the output:&lt;/P&gt;&lt;P&gt;Chart Type: Bar chart&lt;/P&gt;&lt;P&gt;X axis : Calendar Date&lt;/P&gt;&lt;P&gt;Y axis: count(distinct PolicyNumber)&amp;nbsp;&amp;nbsp; -&amp;gt; with the above mentioned conditions&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Result should be: &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;For 08/02/2015&lt;/STRONG&gt; -&amp;gt; cumulative count=3 (It fulfills all the above conditions)&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;For 09/02/2015-&amp;gt;&lt;/STRONG&gt;cumulative count =3 (A4 policy is counted here, but the condition for A1 policy that Calendar Date &amp;lt;= EndDate is not fulfilled for the date 09/02/2015 i.e. 08/02/2015 &amp;lt;09/02/2015 )&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;For 10/02/2015&lt;/STRONG&gt;-&amp;gt; cumulative count =4((as A2 policy was also available for previous date, hence not counted again, only A5 policy is considered and added to the previous 3 policies)&lt;/P&gt;&lt;P&gt;Please let me know the solution to get the above output.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please note:&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;The application is being developed in Qliksense and hence, I have no option for Accumulation to be enabled.&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;I am using this formula:&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;=RangeSum(Above(sum(aggr(count({&amp;lt;CalendarDate={"&amp;gt;=$(=DATE(min(TransactionEffectiveDate),'DD/MM/YYYY'))&amp;lt;=$(=DATE(max(TransactionEndDate),'DD/MM/YYYY'))"}&amp;gt;}distinct PolicyNumber),PolicyNumber)),0,RowNo()))&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;But I get the output as 3,4,5 which is incorrect.&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;Can anyone please guide me with the proper solution?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 03 Jun 2017 08:43:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Need-cumulative-distinct-count-in-bar-chart/m-p/1306570#M27801</guid>
      <dc:creator>twinklea</dc:creator>
      <dc:date>2017-06-03T08:43:36Z</dc:date>
    </item>
    <item>
      <title>Re: Need cumulative distinct count in bar chart</title>
      <link>https://community.qlik.com/t5/App-Development/Need-cumulative-distinct-count-in-bar-chart/m-p/1306571#M27802</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I believe you need something different because you are doing count distinct. Perhaps some tips here? &lt;A href="https://community.qlik.com/docs/DOC-4252"&gt;Calculating rolling n-period totals, averages or other aggregations&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Jul 2018 18:23:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Need-cumulative-distinct-count-in-bar-chart/m-p/1306571#M27802</guid>
      <dc:creator>Tyler_Waterfall</dc:creator>
      <dc:date>2018-07-05T18:23:42Z</dc:date>
    </item>
  </channel>
</rss>

