<?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 Set Analysis and Aggregation in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Set-Analysis-and-Aggregation/m-p/1970613#M80079</link>
    <description>&lt;P&gt;Hi guys,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have a peculiar problem regarding the combination of a formula that is supposed to show an aggregated median of a ratio within a statistical year.&lt;/P&gt;
&lt;P&gt;The following formulas do work for the year that has been selected:&lt;/P&gt;
&lt;P&gt;Median(aggr({$&amp;lt;StatYear={$(=max(StatYear))}&amp;gt;}sum(MeasureA/MeasureB), AggregationDimension)&lt;BR /&gt;Median(aggr(sum({$&amp;lt;StatYear={$(=max(StatYear))}&amp;gt;}MeasureA/MeasureB), AggregationDimension)&lt;/P&gt;
&lt;P&gt;However, I want to display previous year data as a comparison, as well. So I tried the following:&lt;/P&gt;
&lt;P&gt;Median(aggr({$&amp;lt;StatYear={$(=max(StatYear)-1)}&amp;gt;}sum(MeasureA/MeasureB), AggregationDimension)&lt;BR /&gt;Median(aggr(sum({$&amp;lt;StatYear={$(=max(StatYear)-1)}&amp;gt;}MeasureA/MeasureB), AggregationDimension)&lt;/P&gt;
&lt;P&gt;But I don't receive any output, unless I select both years. I do not want to do this, though, because it would mess up the rest of my report.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also, this applies only tor this specific formula. When simply calculating the mean or the median without any aggregation*, my report will display previous year data without any problems, even though only one year is selected.&lt;/P&gt;
&lt;P&gt;*sum({$&amp;lt;StatYear={$(=max(StatYear)-1)}&amp;gt;}MeasureA/MeasureB)&lt;/P&gt;
&lt;P&gt;*median({$&amp;lt;StatYear={$(=max(StatYear)-1)}&amp;gt;}MeasureA/MeasureB)&lt;/P&gt;
&lt;P&gt;Where am I messing up?&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 19 Aug 2022 08:15:43 GMT</pubDate>
    <dc:creator>hppflpp</dc:creator>
    <dc:date>2022-08-19T08:15:43Z</dc:date>
    <item>
      <title>Set Analysis and Aggregation</title>
      <link>https://community.qlik.com/t5/App-Development/Set-Analysis-and-Aggregation/m-p/1970613#M80079</link>
      <description>&lt;P&gt;Hi guys,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have a peculiar problem regarding the combination of a formula that is supposed to show an aggregated median of a ratio within a statistical year.&lt;/P&gt;
&lt;P&gt;The following formulas do work for the year that has been selected:&lt;/P&gt;
&lt;P&gt;Median(aggr({$&amp;lt;StatYear={$(=max(StatYear))}&amp;gt;}sum(MeasureA/MeasureB), AggregationDimension)&lt;BR /&gt;Median(aggr(sum({$&amp;lt;StatYear={$(=max(StatYear))}&amp;gt;}MeasureA/MeasureB), AggregationDimension)&lt;/P&gt;
&lt;P&gt;However, I want to display previous year data as a comparison, as well. So I tried the following:&lt;/P&gt;
&lt;P&gt;Median(aggr({$&amp;lt;StatYear={$(=max(StatYear)-1)}&amp;gt;}sum(MeasureA/MeasureB), AggregationDimension)&lt;BR /&gt;Median(aggr(sum({$&amp;lt;StatYear={$(=max(StatYear)-1)}&amp;gt;}MeasureA/MeasureB), AggregationDimension)&lt;/P&gt;
&lt;P&gt;But I don't receive any output, unless I select both years. I do not want to do this, though, because it would mess up the rest of my report.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also, this applies only tor this specific formula. When simply calculating the mean or the median without any aggregation*, my report will display previous year data without any problems, even though only one year is selected.&lt;/P&gt;
&lt;P&gt;*sum({$&amp;lt;StatYear={$(=max(StatYear)-1)}&amp;gt;}MeasureA/MeasureB)&lt;/P&gt;
&lt;P&gt;*median({$&amp;lt;StatYear={$(=max(StatYear)-1)}&amp;gt;}MeasureA/MeasureB)&lt;/P&gt;
&lt;P&gt;Where am I messing up?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 19 Aug 2022 08:15:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Set-Analysis-and-Aggregation/m-p/1970613#M80079</guid>
      <dc:creator>hppflpp</dc:creator>
      <dc:date>2022-08-19T08:15:43Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis and Aggregation</title>
      <link>https://community.qlik.com/t5/App-Development/Set-Analysis-and-Aggregation/m-p/1971006#M80106</link>
      <description>&lt;P&gt;Have you considered deriving the previous year as a variable and using that instead? Also, you might want to include the year field as part of the Aggregation Dimensions.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 21 Aug 2022 15:17:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Set-Analysis-and-Aggregation/m-p/1971006#M80106</guid>
      <dc:creator>BrunPierre</dc:creator>
      <dc:date>2022-08-21T15:17:57Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis and Aggregation</title>
      <link>https://community.qlik.com/t5/App-Development/Set-Analysis-and-Aggregation/m-p/1971332#M80136</link>
      <description>&lt;P&gt;Hi Peter,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;thanks for your reply and your ideas.&lt;BR /&gt;I wouldn't want to use variables, as I would want to display values for both years in one chart at the same time so I can compare them. Also, I would have to restructure my whole report due to this one formula.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Combining the previous year with the aggregation dimension won't do the trick.&amp;nbsp;&lt;BR /&gt;Also, I made sure before, that the aggregation dimension will never have the same value for two different years.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 22 Aug 2022 13:35:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Set-Analysis-and-Aggregation/m-p/1971332#M80136</guid>
      <dc:creator>hppflpp</dc:creator>
      <dc:date>2022-08-22T13:35:53Z</dc:date>
    </item>
  </channel>
</rss>

