<?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: Nested Aggr and Set Analysis in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Nested-Aggr-and-Set-Analysis/m-p/865136#M302658</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That worked, thanks a ton&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 19 Jun 2015 17:49:21 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2015-06-19T17:49:21Z</dc:date>
    <item>
      <title>Nested Aggr and Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Nested-Aggr-and-Set-Analysis/m-p/865133#M302655</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am dealing with some financial data which basically requires plotting the last value of a field/measure(NAV) in a month (hence the firstsortedvalue by -ve weight of the period_end_date) in a series of charts.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The formula I've used to accomplish this is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;aggr(Sum(aggr(FirstSortedValue((END_MONTH_NAV),-PERIOD_END_DATE),PORTFOLIO_CD,MonthYear)),MonthYear)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;where PORTFOLIO_CD and MonthYear are the dimensions to slice the data. I now need to put in a set condition on one of the charts to ignore user selection on the PERIOD_END_DATE or have it be &amp;lt;= selected period end date. I'm having some issues figuring out where exactly the {&amp;lt;PERIOD_END_DATE =&amp;gt;} should go in this this statement?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;aggr(Sum(&lt;SPAN style="font-size: 13.3333330154419px;"&gt;{&amp;lt;PERIOD_END_DATE =&amp;gt;} &lt;/SPAN&gt;aggr(FirstSortedValue((END_MONTH_NAV),-PERIOD_END_DATE),PORTFOLIO_CD,MonthYear)),MonthYear)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;The above statement does not seem to work: any pointers would be much appreciated, thanks.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Jun 2015 17:41:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Nested-Aggr-and-Set-Analysis/m-p/865133#M302655</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-06-19T17:41:34Z</dc:date>
    </item>
    <item>
      <title>Re: Nested Aggr and Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Nested-Aggr-and-Set-Analysis/m-p/865134#M302656</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;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13.3333330154419px;"&gt;&lt;STRONG&gt;=Aggr(Sum(&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG style="color: #3d3d3d; font-size: 13.3333330154419px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;{&amp;lt;PERIOD_END_DATE =&amp;gt;} A&lt;/STRONG&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13.3333330154419px;"&gt;&lt;STRONG&gt;ggr(FirstSortedValue(&lt;SPAN style="color: #ff0000; font-size: 13.3333330154419px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;{&amp;lt;PERIOD_END_DATE =&amp;gt;}&lt;/SPAN&gt;(END_MONTH_NAV),-PERIOD_END_DATE),PORTFOLIO_CD,MonthYear)),MonthYear)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Jun 2015 17:44:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Nested-Aggr-and-Set-Analysis/m-p/865134#M302656</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2015-06-19T17:44:31Z</dc:date>
    </item>
    <item>
      <title>Re: Nested Aggr and Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Nested-Aggr-and-Set-Analysis/m-p/865135#M302657</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not sure if I fully understood your issue, it would be good if you could upload a small sample QVW if needed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You may need to add the set expression to each aggregation function, including an implicite outer only():&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;= only(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13.3333330154419px;"&gt;{&amp;lt;PERIOD_END_DATE =&amp;gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13.3333330154419px;"&gt;aggr(Sum(&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333330154419px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;{&amp;lt;PERIOD_END_DATE =&amp;gt;} &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13.3333330154419px;"&gt;aggr(FirstSortedValue(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13.3333330154419px;"&gt;{&amp;lt;PERIOD_END_DATE =&amp;gt;} &lt;/SPAN&gt;(END_MONTH_NAV),PERIOD_END_DATE)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13.3333330154419px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,PORTFOLIO_CD,MonthYear)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13.3333330154419px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ),MonthYear)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13.3333330154419px;"&gt;)&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Jun 2015 17:45:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Nested-Aggr-and-Set-Analysis/m-p/865135#M302657</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2015-06-19T17:45:55Z</dc:date>
    </item>
    <item>
      <title>Re: Nested Aggr and Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Nested-Aggr-and-Set-Analysis/m-p/865136#M302658</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That worked, thanks a ton&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Jun 2015 17:49:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Nested-Aggr-and-Set-Analysis/m-p/865136#M302658</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-06-19T17:49:21Z</dc:date>
    </item>
    <item>
      <title>Re: Nested Aggr and Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Nested-Aggr-and-Set-Analysis/m-p/865137#M302659</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No problem &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am glad I was able to help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;Sunny&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Jun 2015 17:51:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Nested-Aggr-and-Set-Analysis/m-p/865137#M302659</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2015-06-19T17:51:13Z</dc:date>
    </item>
    <item>
      <title>Re: Nested Aggr and Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Nested-Aggr-and-Set-Analysis/m-p/865138#M302660</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So not quite sure what happened there, but I guess I called it too soon, it seems,&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333330154419px;"&gt;&lt;STRONG style="font-style: inherit; font-size: 13.3333320617676px; font-family: inherit;"&gt;Aggr(Sum(&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG style="font-style: inherit; font-size: 13.3333330154419px;"&gt;{&amp;lt;PERIOD_END_DATE =&amp;gt;} A&lt;/STRONG&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333330154419px;"&gt;&lt;STRONG style="font-style: inherit; font-size: 13.3333320617676px; font-family: inherit;"&gt;ggr(FirstSortedValue(&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333330154419px; color: #ff0000;"&gt;{&amp;lt;PERIOD_END_DATE =&amp;gt;}&lt;/SPAN&gt;(END_MONTH_NAV),-PERIOD_END_DATE),PORTFOLIO_CD,MonthYear)),MonthYear) &lt;/STRONG&gt;still does not ignore the selections (another sheet in this app has clear selections enabled which caused me to think the issue had been resolved &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;, while I worked on another&amp;nbsp; app). Using Only will not work here since I want it to return all the values for the last nav update in each month from inception.&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="jive-thread-reply-btn" style="margin: 15px 0 -10px; font-size: 0.9em; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;DIV class="jive-thread-reply-btn-correct" style="font-weight: inherit; font-style: inherit; font-size: 11.6999998092651px; font-family: inherit;"&gt;&lt;A _jive_internal="true" href="https://community.qlik.com/message/802341" style="margin: 0 20px 0 0; padding: 2px 14px 4px 28px; font-weight: bold; font-style: inherit; font-size: 11.6999998092651px; font-family: inherit; color: #3778c7; background-color: #f3f3f3;"&gt;Nested Aggr and Set Analysis&lt;/A&gt;&lt;P&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Jun 2015 21:24:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Nested-Aggr-and-Set-Analysis/m-p/865138#M302660</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-06-19T21:24:48Z</dc:date>
    </item>
    <item>
      <title>Re: Nested Aggr and Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Nested-Aggr-and-Set-Analysis/m-p/865139#M302661</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In your original post, you used the outer aggr() without an outer aggregation function, this will lead to an implicite only() function applied. Have you tried with the only() + set expression?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your expression also only clears selections in one field, maybe you need to consider other fields to clear?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If this doesn't work, could you upload&amp;nbsp; a small sample QVW that demonstrates this issue?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Jun 2015 21:30:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Nested-Aggr-and-Set-Analysis/m-p/865139#M302661</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2015-06-19T21:30:31Z</dc:date>
    </item>
    <item>
      <title>Re: Nested Aggr and Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Nested-Aggr-and-Set-Analysis/m-p/865140#M302662</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I got it to work using max using your suggestions, but only works as well. I guess I need to delve deeper into how only works. Verified it really works this time &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;Thanks again for all your help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Jun 2015 21:36:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Nested-Aggr-and-Set-Analysis/m-p/865140#M302662</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-06-19T21:36:30Z</dc:date>
    </item>
  </channel>
</rss>

