<?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 behave strange. in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Set-analysis-behave-strange/m-p/1056475#M16812</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not quite sure what your setting is, have a look at&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/qlik-blogpost/4669"&gt;Set Analysis in the Aggr function&lt;/A&gt;&lt;/P&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;So try with adding the set analysis to the outer aggregation, too:&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;&lt;P&gt;Sum({ $ &amp;lt;filter_date = {'$(=date(floor(Max( {$&amp;lt;[filter_date]=&amp;gt;} discoverydate))))'} &amp;gt;} &lt;/P&gt;&lt;P&gt;aggr ( { $ &amp;lt;filter_date = {'$(=date(floor(Max( {$&amp;lt;[filter_date]=&amp;gt;} discoverydate))))'} &amp;gt;} &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; price, product_id, filter_date) ) &lt;/P&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 11 Mar 2016 15:24:31 GMT</pubDate>
    <dc:creator>swuehl</dc:creator>
    <dc:date>2016-03-11T15:24:31Z</dc:date>
    <item>
      <title>Set analysis behave strange.</title>
      <link>https://community.qlik.com/t5/App-Development/Set-analysis-behave-strange/m-p/1056474#M16811</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #575757;"&gt;Hi,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #575757;"&gt;I am working with Set analysis to create some KPIs in a dashboard.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To understand it correctly I am still going with tests.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have this KPI function:&lt;/P&gt;&lt;P&gt;Sum( aggr ( { $ &amp;lt;filter_date = {'$(=date(floor(Max( {$&amp;lt;[filter_date]=&amp;gt;} discoverydate))))'} &amp;gt;} &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; price, product_id, filter_date) ) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a current selection, with one product_id and one merchant, thus I should have one product with one price.&lt;/P&gt;&lt;P&gt;As I go with this set analysis I expect that the Sum of the one record should be the price of that product.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But if I have no filter_date selection in the current selection, I get a higher value.&lt;/P&gt;&lt;P&gt;Only if I set the filter_date by myself in the selection the Sum equals one price.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is the Set analysis wrong?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Mar 2016 14:31:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Set-analysis-behave-strange/m-p/1056474#M16811</guid>
      <dc:creator />
      <dc:date>2016-03-11T14:31:17Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis behave strange.</title>
      <link>https://community.qlik.com/t5/App-Development/Set-analysis-behave-strange/m-p/1056475#M16812</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not quite sure what your setting is, have a look at&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/qlik-blogpost/4669"&gt;Set Analysis in the Aggr function&lt;/A&gt;&lt;/P&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;So try with adding the set analysis to the outer aggregation, too:&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;&lt;P&gt;Sum({ $ &amp;lt;filter_date = {'$(=date(floor(Max( {$&amp;lt;[filter_date]=&amp;gt;} discoverydate))))'} &amp;gt;} &lt;/P&gt;&lt;P&gt;aggr ( { $ &amp;lt;filter_date = {'$(=date(floor(Max( {$&amp;lt;[filter_date]=&amp;gt;} discoverydate))))'} &amp;gt;} &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; price, product_id, filter_date) ) &lt;/P&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Mar 2016 15:24:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Set-analysis-behave-strange/m-p/1056475#M16812</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2016-03-11T15:24:31Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis behave strange.</title>
      <link>https://community.qlik.com/t5/App-Development/Set-analysis-behave-strange/m-p/1056476#M16813</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok, I tried with 2 Sets before, but there are more things to be right.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I thought because of the reduced data, that I don't need that much dimensions in the AGGR.&lt;/P&gt;&lt;P&gt;But if I leave out the filter_date as dimension, it doesn't find data. The matrix seemed to be calculated and then the data is cut out depending from the Set.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I now have:&lt;/P&gt;&lt;P&gt;(Dunno why this editor puts it as table)&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Sum( { $ &amp;lt;filter_date = {'$(=date(floor(Max( {$&amp;lt;[filter_date]=&amp;gt;} filter_date))))'}, calc_merchant&lt;/TD&gt;&lt;TD&gt;= {"OWN_CLIENT_DATA_FLAG"} &amp;gt;} &lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;aggr ( { $ &amp;lt;filter_date = {'$(=date(floor(Max( {$&amp;lt;[filter_date]=&amp;gt;} filter_date))))'}, calc_merchant&lt;/TD&gt;&lt;TD&gt;= {"OWN_CLIENT_DATA_FLAG"} &amp;gt;} &lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&amp;nbsp;&amp;nbsp; &lt;/TD&gt;&lt;TD&gt;price * selling_quantity, product_id, calc_merchant, filter_date) ) &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need cals_merchant as dimension because otherwise there are empty values for selling_quantity and thus even with the cals_merchant set to "OWN_CLIENT..." (where I have values for the selling_quantity) the AGGR is build in a wrong way.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think I am near 80% to get it.&lt;/P&gt;&lt;P&gt;Thx for the help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Mar 2016 16:00:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Set-analysis-behave-strange/m-p/1056476#M16813</guid>
      <dc:creator />
      <dc:date>2016-03-11T16:00:01Z</dc:date>
    </item>
  </channel>
</rss>

