<?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: Aggr function inside Set Analysis in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Aggr-function-inside-Set-Analysis/m-p/1185748#M884922</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Creo que para lo que necesitas no es necesario el uso de AGRR(), intenta con el Set analysis como se muestra acontinuación, espero te sea util.&lt;BR /&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: 13px;"&gt;&lt;BR /&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: 13px;"&gt;Set Analysis:&lt;/SPAN&gt;=Sum({$&amp;lt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px; background-color: #c9d7f1;"&gt;date_id &lt;/SPAN&gt;=, &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px; background-color: #c9d7f1;"&gt;date_id &lt;/SPAN&gt;={"$(=Max(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px; background-color: #c9d7f1;"&gt;date_id &lt;/SPAN&gt;))"}&amp;gt;}&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;VALOR&lt;/SPAN&gt;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Saludos.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 15 Sep 2016 16:17:28 GMT</pubDate>
    <dc:creator>bertinabel</dc:creator>
    <dc:date>2016-09-15T16:17:28Z</dc:date>
    <item>
      <title>Aggr function inside Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Aggr-function-inside-Set-Analysis/m-p/1185746#M884920</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm trying to find the sum of the last day's value over a specified date range. This means finding the sum of the value on the last day of the week, month, year or quarter. The date range is variable, and set by the user, i.e. they click monthly and the variable is set to the dimension needed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've created an aggregate function to determine the last day of the time interval period, and it seems to be working fine, it returns the correct values (last day of the week/month/quarter/year).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Function: =AGGR(MAX(DATE_ID),$(vTimeFunction))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now my problem, I'm trying to use this aggr function inside set analysis, to get the sum of the value where the day = aggr value, but no luck. The set expression returns the value of a seemingly random day in the period.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Set Analysis: =SUM({&amp;lt;DATE_ID = {"=AGGR(MAX(DATE_ID),$(vTimeFunction))"}&amp;gt;} VALUE)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas on how to do this correctly, or what is causing my set analysis not to work?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Help is greatly appreciated!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggr-function-inside-Set-Analysis/m-p/1185746#M884920</guid>
      <dc:creator />
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Aggr function inside Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Aggr-function-inside-Set-Analysis/m-p/1185747#M884921</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;An advanced search is creating internally an hypercube with DATE_ID as dimension and &lt;/P&gt;&lt;P&gt;=Aggr(Max(DATE_ID), $(vTimeFunction) ) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;as expression.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The dimension values where the expressions return true are included in the set.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It's not a good idea to use aggr() as expression without an outer aggregation function:&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/qlik-blogpost/4418"&gt;Pitfalls of the Aggr function&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/qlik-blogpost/3779"&gt;Use Aggregation Functions!&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Maybe it's better to create a couple of flags in your master calendar and chose which flag to use using your variable.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Sep 2016 16:02:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggr-function-inside-Set-Analysis/m-p/1185747#M884921</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2016-09-15T16:02:35Z</dc:date>
    </item>
    <item>
      <title>Re: Aggr function inside Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Aggr-function-inside-Set-Analysis/m-p/1185748#M884922</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Creo que para lo que necesitas no es necesario el uso de AGRR(), intenta con el Set analysis como se muestra acontinuación, espero te sea util.&lt;BR /&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: 13px;"&gt;&lt;BR /&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: 13px;"&gt;Set Analysis:&lt;/SPAN&gt;=Sum({$&amp;lt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px; background-color: #c9d7f1;"&gt;date_id &lt;/SPAN&gt;=, &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px; background-color: #c9d7f1;"&gt;date_id &lt;/SPAN&gt;={"$(=Max(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px; background-color: #c9d7f1;"&gt;date_id &lt;/SPAN&gt;))"}&amp;gt;}&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;VALOR&lt;/SPAN&gt;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Saludos.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Sep 2016 16:17:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggr-function-inside-Set-Analysis/m-p/1185748#M884922</guid>
      <dc:creator>bertinabel</dc:creator>
      <dc:date>2016-09-15T16:17:28Z</dc:date>
    </item>
  </channel>
</rss>

