<?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: Set Analysis with nested AGGR in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Set-Analysis-with-nested-AGGR/m-p/1754796#M455316</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;The correct expression is this.&lt;/P&gt;&lt;P&gt;COunt({&amp;lt;Customer = {'=Sum(aggr(Count({&amp;lt;Creation_Date = p({&amp;lt;Product_Group=,Creation_Date = {"&amp;gt;$(=min(Creation_Date))"}&amp;gt;})&amp;gt;}DISTINCT Creation_Date),Customer))&amp;gt;0'}&amp;gt;}DISTINCT Customer)&lt;/P&gt;&lt;P&gt;Check attached qvw file too.&lt;/P&gt;&lt;P&gt;I have tried to make it more flexible by making the'0' dynamic (Bases on user input)&lt;/P&gt;&lt;P&gt;Hope this solves your issue.&lt;/P&gt;</description>
    <pubDate>Thu, 22 Oct 2020 07:06:19 GMT</pubDate>
    <dc:creator>kaushiknsolanki</dc:creator>
    <dc:date>2020-10-22T07:06:19Z</dc:date>
    <item>
      <title>Set Analysis with nested AGGR</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-with-nested-AGGR/m-p/1754779#M455313</link>
      <description>&lt;P&gt;Hi People,&lt;/P&gt;&lt;P&gt;I have a request to display returning customers as a dynamic KPI, meaning, for&amp;nbsp; the previous 6 month of a selected date.&amp;nbsp;&lt;/P&gt;&lt;P&gt;The user selects a product, and a returning customer would be a customer that bought one or more product after the first buying&amp;nbsp; date of the selected product. I'm struggling with a Set Analysis expression to&amp;nbsp; count the relevant&amp;nbsp; customers.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have managed to calculate the number of return dates:&lt;/P&gt;&lt;P&gt;Sum(aggr(Count({&amp;lt;Creation_Date = p({&amp;lt;Product_Group=, Creation_Date = {"&amp;gt;$(=min(Creation_Date))"}&amp;gt;} )&amp;gt;}DISTINCT Creation_Date),Customer))&lt;/P&gt;&lt;P&gt;In order to count the relevant customers I added:&lt;/P&gt;&lt;P&gt;=&lt;FONT color="#FF0000"&gt;Count({&amp;lt; Customer = {"&lt;/FONT&gt;Sum(aggr(Count({&amp;lt;Product_Group=, Creation_Date = p({&amp;lt;Creation_Date = {'&amp;gt;$(=min(Creation_Date))'}&amp;gt;})&amp;gt;}DISTINCT Creation_Date),Customer))&amp;gt;0"}&amp;gt;}&lt;FONT color="#FF0000"&gt;DISTINCT Customer)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;But the above doesn't work: the result is 0.&lt;/P&gt;&lt;P&gt;Can someone help me figure out why?&lt;/P&gt;&lt;P&gt;Attached are the model &amp;amp; data.&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 17:56:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-with-nested-AGGR/m-p/1754779#M455313</guid>
      <dc:creator>dana</dc:creator>
      <dc:date>2024-11-16T17:56:11Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis with nested AGGR</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-with-nested-AGGR/m-p/1754789#M455314</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/68009"&gt;@dana&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think, you missed out "=" alone in your expression. Try like below&lt;/P&gt;&lt;P&gt;='# of Customers:'&amp;amp; Count({&amp;lt; Customer &lt;STRONG&gt;= {"=Sum(a&lt;/STRONG&gt;ggr(Count({&amp;lt;Product_Group=, Creation_Date = p({&amp;lt;Creation_Date = {'&amp;gt;$(=min(Creation_Date))'}&amp;gt;})&amp;gt;}DISTINCT Creation_Date),Customer))&amp;gt;0"}&amp;gt;}DISTINCT Customer)&lt;/P&gt;&lt;P&gt;Hope it helps&lt;/P&gt;</description>
      <pubDate>Thu, 22 Oct 2020 06:51:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-with-nested-AGGR/m-p/1754789#M455314</guid>
      <dc:creator>MayilVahanan</dc:creator>
      <dc:date>2020-10-22T06:51:38Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis with nested AGGR</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-with-nested-AGGR/m-p/1754793#M455315</link>
      <description>&lt;P&gt;Hi Mayil,&lt;/P&gt;&lt;P&gt;I fixed it but it doesn't help.&lt;/P&gt;&lt;P&gt;Thanks..&lt;/P&gt;</description>
      <pubDate>Thu, 22 Oct 2020 06:58:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-with-nested-AGGR/m-p/1754793#M455315</guid>
      <dc:creator>dana</dc:creator>
      <dc:date>2020-10-22T06:58:11Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis with nested AGGR</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-with-nested-AGGR/m-p/1754796#M455316</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;The correct expression is this.&lt;/P&gt;&lt;P&gt;COunt({&amp;lt;Customer = {'=Sum(aggr(Count({&amp;lt;Creation_Date = p({&amp;lt;Product_Group=,Creation_Date = {"&amp;gt;$(=min(Creation_Date))"}&amp;gt;})&amp;gt;}DISTINCT Creation_Date),Customer))&amp;gt;0'}&amp;gt;}DISTINCT Customer)&lt;/P&gt;&lt;P&gt;Check attached qvw file too.&lt;/P&gt;&lt;P&gt;I have tried to make it more flexible by making the'0' dynamic (Bases on user input)&lt;/P&gt;&lt;P&gt;Hope this solves your issue.&lt;/P&gt;</description>
      <pubDate>Thu, 22 Oct 2020 07:06:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-with-nested-AGGR/m-p/1754796#M455316</guid>
      <dc:creator>kaushiknsolanki</dc:creator>
      <dc:date>2020-10-22T07:06:19Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis with nested AGGR</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-with-nested-AGGR/m-p/1754813#M455317</link>
      <description>&lt;P&gt;Definitely solved the issue!&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you very much!&amp;nbsp;&lt;/P&gt;&lt;P&gt;Apparently, the issue was because of the quotes..&amp;nbsp; I based it on&amp;nbsp;&lt;A href="http://poverconsulting.com/2014/03/04/set-analysis-nested-advanced-search/" target="_self"&gt;&amp;nbsp;Karl Pavel's post&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SA example.png" style="width: 702px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/42773i503DD60FFC4904A7/image-dimensions/702x251?v=v2" width="702" height="251" role="button" title="SA example.png" alt="SA example.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 22 Oct 2020 08:21:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-with-nested-AGGR/m-p/1754813#M455317</guid>
      <dc:creator>dana</dc:creator>
      <dc:date>2020-10-22T08:21:19Z</dc:date>
    </item>
  </channel>
</rss>

