<?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: How to select from an alternative set (e.g a bookmark) within an aggr function. in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/How-to-select-from-an-alternative-set-e-g-a-bookmark-within-an/m-p/553558#M206819</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the responses.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Swuehl, this gives me a figure double of what i expect to see.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P class="j-author-act font-color-meta-light"&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;
&lt;P&gt;You might need to apply the set expression also to the outer aggregation:&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;=sum({BM2012&amp;lt;FiscalYear=,Year=,LOS = {"&amp;gt;= $(vSlider)"}&amp;gt;} aggr(sum({BM2012&amp;lt;FiscalYear=,Year=,LOS = {"&amp;gt;= $(vSlider)"}&amp;gt;} Distinct LOS), zNumber))&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Could be also something different that causes your issue, but 'this does not work' is not a sufficient piece of information to really help you.&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P class="font-color-meta j-meta-actions"&gt;&lt;SPAN class="j-bullet"&gt;•&lt;/SPAN&gt; &lt;A class="j-reply-rte"&gt;Reply&lt;/A&gt; &lt;SPAN class="j-bullet"&gt;•&lt;/SPAN&gt; &lt;SPAN class="j-js-liking-control"&gt;&lt;SPAN class="acclaim-container"&gt;&lt;SPAN class="font-color-meta-light acclaim-like-container js-acclaim-container" data-can-like="true" data-likes="0" data-showicon="false" data-type="mini"&gt;&lt;SPAN class="j-social-action"&gt;&lt;A _jive_internal="true" data-command="like" data-object-id="415210" data-object-type="2" href="https://community.qlik.com/activity" title="Like"&gt;Like&lt;/A&gt; &lt;LABEL class="j-508-label"&gt;Show 0 Likes&lt;/LABEL&gt;&lt;A _jive_internal="true" data-command="showLikes" data-count="0" data-object-id="415210" data-object-type="2" href="https://community.qlik.com/activity"&gt;(0)&lt;/A&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
 &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have only used a Bookmark as a workaround for the problem. The key requirement is to be able to select from a set, in this case fiscalyear '12-13',&amp;nbsp; regardless of what the user selects for FiscalYear or Year fields on my app. So for example this function works:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=sum({&amp;lt;FiscalYear={'12-13'}, Year=,LOS = {"&amp;gt;= $(vSlider)"}&amp;gt;} LOS )&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;But when using the criteria in an aggr it it the value returned is substantially less than the query excluding the aggr function. I am expecting them to be the same. (I have remove the vSlider for simplicity.)&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;=sum(aggr(sum({&amp;lt;FiscalYear={'12-13'}&amp;gt;} Distinct LOS, zNumber))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 31 Oct 2013 13:35:26 GMT</pubDate>
    <dc:creator />
    <dc:date>2013-10-31T13:35:26Z</dc:date>
    <item>
      <title>How to select from an alternative set (e.g a bookmark) within an aggr function.</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-select-from-an-alternative-set-e-g-a-bookmark-within-an/m-p/553555#M206816</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am trying to select an alternative set (a bookmark) within an aggr with no luck. This does not work:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=sum(aggr(sum({BM2012&amp;lt;FiscalYear=,Year=,LOS = {"&amp;gt;= $(vSlider)"}&amp;gt;} Distinct LOS), zNumber))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BM2012 is a bookmark for the fiscal year 2012-2013.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 Oct 2013 10:12:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-select-from-an-alternative-set-e-g-a-bookmark-within-an/m-p/553555#M206816</guid>
      <dc:creator />
      <dc:date>2013-10-31T10:12:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to select from an alternative set (e.g a bookmark) within an aggr function.</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-select-from-an-alternative-set-e-g-a-bookmark-within-an/m-p/553556#M206817</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You might need to apply the set expression also to the outer aggregation:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=sum({BM2012&amp;lt;FiscalYear=,Year=,LOS = {"&amp;gt;= $(vSlider)"}&amp;gt;} aggr(sum({BM2012&amp;lt;FiscalYear=,Year=,LOS = {"&amp;gt;= $(vSlider)"}&amp;gt;} Distinct LOS), zNumber))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could be also something different that causes your issue, but 'this does not work' is not a sufficient piece of information to really help you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 Oct 2013 10:24:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-select-from-an-alternative-set-e-g-a-bookmark-within-an/m-p/553556#M206817</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2013-10-31T10:24:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to select from an alternative set (e.g a bookmark) within an aggr function.</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-select-from-an-alternative-set-e-g-a-bookmark-within-an/m-p/553557#M206818</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That is the right way to do: use the bookmark name into the set analysis. if no space, no need to use any bracket.&lt;/P&gt;&lt;P&gt;I am surprised with the Distinct qualifier into the sum() function&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Fabrice&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 Oct 2013 10:26:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-select-from-an-alternative-set-e-g-a-bookmark-within-an/m-p/553557#M206818</guid>
      <dc:creator />
      <dc:date>2013-10-31T10:26:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to select from an alternative set (e.g a bookmark) within an aggr function.</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-select-from-an-alternative-set-e-g-a-bookmark-within-an/m-p/553558#M206819</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the responses.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Swuehl, this gives me a figure double of what i expect to see.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P class="j-author-act font-color-meta-light"&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;
&lt;P&gt;You might need to apply the set expression also to the outer aggregation:&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;=sum({BM2012&amp;lt;FiscalYear=,Year=,LOS = {"&amp;gt;= $(vSlider)"}&amp;gt;} aggr(sum({BM2012&amp;lt;FiscalYear=,Year=,LOS = {"&amp;gt;= $(vSlider)"}&amp;gt;} Distinct LOS), zNumber))&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Could be also something different that causes your issue, but 'this does not work' is not a sufficient piece of information to really help you.&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P class="font-color-meta j-meta-actions"&gt;&lt;SPAN class="j-bullet"&gt;•&lt;/SPAN&gt; &lt;A class="j-reply-rte"&gt;Reply&lt;/A&gt; &lt;SPAN class="j-bullet"&gt;•&lt;/SPAN&gt; &lt;SPAN class="j-js-liking-control"&gt;&lt;SPAN class="acclaim-container"&gt;&lt;SPAN class="font-color-meta-light acclaim-like-container js-acclaim-container" data-can-like="true" data-likes="0" data-showicon="false" data-type="mini"&gt;&lt;SPAN class="j-social-action"&gt;&lt;A _jive_internal="true" data-command="like" data-object-id="415210" data-object-type="2" href="https://community.qlik.com/activity" title="Like"&gt;Like&lt;/A&gt; &lt;LABEL class="j-508-label"&gt;Show 0 Likes&lt;/LABEL&gt;&lt;A _jive_internal="true" data-command="showLikes" data-count="0" data-object-id="415210" data-object-type="2" href="https://community.qlik.com/activity"&gt;(0)&lt;/A&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
 &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have only used a Bookmark as a workaround for the problem. The key requirement is to be able to select from a set, in this case fiscalyear '12-13',&amp;nbsp; regardless of what the user selects for FiscalYear or Year fields on my app. So for example this function works:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=sum({&amp;lt;FiscalYear={'12-13'}, Year=,LOS = {"&amp;gt;= $(vSlider)"}&amp;gt;} LOS )&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;But when using the criteria in an aggr it it the value returned is substantially less than the query excluding the aggr function. I am expecting them to be the same. (I have remove the vSlider for simplicity.)&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;=sum(aggr(sum({&amp;lt;FiscalYear={'12-13'}&amp;gt;} Distinct LOS, zNumber))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 Oct 2013 13:35:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-select-from-an-alternative-set-e-g-a-bookmark-within-an/m-p/553558#M206819</guid>
      <dc:creator />
      <dc:date>2013-10-31T13:35:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to select from an alternative set (e.g a bookmark) within an aggr function.</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-select-from-an-alternative-set-e-g-a-bookmark-within-an/m-p/553559#M206820</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It's almost impossible to help you, just because we still know almost nothing about your data and setting.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you upload a small sample file?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your two expressions differ not only in the use of advanced aggregation, but also in the field modifiers used (e.g. Year= ) and in the use of a DISTINCT qualifier. So I wouldn't be surprised getting a different result.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 Oct 2013 14:05:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-select-from-an-alternative-set-e-g-a-bookmark-within-an/m-p/553559#M206820</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2013-10-31T14:05:42Z</dc:date>
    </item>
  </channel>
</rss>

