<?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 &amp;amp; RANK with two dimensions in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/AGGR-amp-RANK-with-two-dimensions/m-p/2475929#M100211</link>
    <description>&lt;P&gt;Hiello Piotr,&lt;/P&gt;
&lt;P&gt;Allow me to invite you to the &lt;A title="Masters Summit for Qlik" href="https://masterssummit.com" target="_blank" rel="noopener"&gt;Masters Summit for Qlik&lt;/A&gt; in Vienna on September 30th, where I'll be teaching exactly this topic in my session about Advanced Development Techniques, and we will have an opportunity to discuss these issues in great detail.&lt;/P&gt;
&lt;P&gt;In a nutshell - sum(AGGR(IF())) works because your IF condition is evaluated in every line of the chart/table, and you are getting the accurate Rank of each Country within each Year, etc.&lt;/P&gt;
&lt;P&gt;The same condition, in a Set Analysis filter by Country, is being evaluated outside of your chart/table, once for every Country - NOT for each Country within each Year. Hence, it works well for one Country, but not for several Countries.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you REALLY wanted to make it work in Set Analysis, you'd need to create a combined Field Country&amp;amp;Year, and then apply the same Set Analysis to that field. I believe it should work that way.&lt;/P&gt;
&lt;P&gt;Cheers, and I hope to see you in Vienna!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 12 Aug 2024 19:27:41 GMT</pubDate>
    <dc:creator>Oleg_Troyansky</dc:creator>
    <dc:date>2024-08-12T19:27:41Z</dc:date>
    <item>
      <title>AGGR &amp; RANK with two dimensions</title>
      <link>https://community.qlik.com/t5/App-Development/AGGR-amp-RANK-with-two-dimensions/m-p/2475926#M100209</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;(1) here's what I have in my data set&lt;BR /&gt;(2) here's what I want to achieve (calculated on the fly in the visual layer - line chart or a table)&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="piotrbratek_0-1723489145717.jpeg" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/170536iB63DD70DD36E650A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="piotrbratek_0-1723489145717.jpeg" alt="piotrbratek_0-1723489145717.jpeg" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;I know I have to use SUM(AGGR(IF....) to make it work, as AGGR disregards chart dimensions&amp;nbsp; ... and it works...&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="piotrbratek_1-1723489170043.png" style="width: 522px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/170537iF2D585899EF5DA95/image-dimensions/522x42?v=v2" width="522" height="42" role="button" title="piotrbratek_1-1723489170043.png" alt="piotrbratek_1-1723489170043.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="piotrbratek_2-1723489192478.png" style="width: 593px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/170538i91D3D0FF654C1939/image-dimensions/593x160?v=v2" width="593" height="160" role="button" title="piotrbratek_2-1723489192478.png" alt="piotrbratek_2-1723489192478.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;..... BUT on the other hand I'm still curious&amp;nbsp;how to interpret results given below (or the way the formulas work), as e.g. the first one looks fine ...&lt;/P&gt;
&lt;P&gt;Once the formula condition is =1, it looks fine.&amp;nbsp;&lt;BR /&gt;When I change that into &amp;lt;=2 it returns an incorrect result.&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="piotrbratek_3-1723489332314.png" style="width: 588px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/170539iC3939F0EA68BC195/image-dimensions/588x299?v=v2" width="588" height="299" role="button" title="piotrbratek_3-1723489332314.png" alt="piotrbratek_3-1723489332314.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/6622"&gt;@hic&lt;/a&gt;&lt;BR /&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/22245"&gt;@swuehl&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/6152"&gt;@Oleg_Troyansky&lt;/a&gt;&amp;nbsp; ?&lt;/P&gt;</description>
      <pubDate>Mon, 12 Aug 2024 19:05:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/AGGR-amp-RANK-with-two-dimensions/m-p/2475926#M100209</guid>
      <dc:creator>piotr-bratek</dc:creator>
      <dc:date>2024-08-12T19:05:09Z</dc:date>
    </item>
    <item>
      <title>Re: AGGR &amp; RANK with two dimensions</title>
      <link>https://community.qlik.com/t5/App-Development/AGGR-amp-RANK-with-two-dimensions/m-p/2475929#M100211</link>
      <description>&lt;P&gt;Hiello Piotr,&lt;/P&gt;
&lt;P&gt;Allow me to invite you to the &lt;A title="Masters Summit for Qlik" href="https://masterssummit.com" target="_blank" rel="noopener"&gt;Masters Summit for Qlik&lt;/A&gt; in Vienna on September 30th, where I'll be teaching exactly this topic in my session about Advanced Development Techniques, and we will have an opportunity to discuss these issues in great detail.&lt;/P&gt;
&lt;P&gt;In a nutshell - sum(AGGR(IF())) works because your IF condition is evaluated in every line of the chart/table, and you are getting the accurate Rank of each Country within each Year, etc.&lt;/P&gt;
&lt;P&gt;The same condition, in a Set Analysis filter by Country, is being evaluated outside of your chart/table, once for every Country - NOT for each Country within each Year. Hence, it works well for one Country, but not for several Countries.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you REALLY wanted to make it work in Set Analysis, you'd need to create a combined Field Country&amp;amp;Year, and then apply the same Set Analysis to that field. I believe it should work that way.&lt;/P&gt;
&lt;P&gt;Cheers, and I hope to see you in Vienna!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 12 Aug 2024 19:27:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/AGGR-amp-RANK-with-two-dimensions/m-p/2475929#M100211</guid>
      <dc:creator>Oleg_Troyansky</dc:creator>
      <dc:date>2024-08-12T19:27:41Z</dc:date>
    </item>
    <item>
      <title>Re: AGGR &amp; RANK with two dimensions</title>
      <link>https://community.qlik.com/t5/App-Development/AGGR-amp-RANK-with-two-dimensions/m-p/2475931#M100212</link>
      <description>&lt;P&gt;While I am aligned with&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/117769"&gt;@Oleg&lt;/a&gt;&amp;nbsp;comment above, just tried to edit expression with sales field, I take it as&amp;nbsp; only consider sales values for which set expression rank value applies. But it might not work with your real data, not sure about it.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Digvijay_Singh_0-1723491575794.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/170540i2A510FB882673181/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Digvijay_Singh_0-1723491575794.png" alt="Digvijay_Singh_0-1723491575794.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 12 Aug 2024 19:42:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/AGGR-amp-RANK-with-two-dimensions/m-p/2475931#M100212</guid>
      <dc:creator>Digvijay_Singh</dc:creator>
      <dc:date>2024-08-12T19:42:08Z</dc:date>
    </item>
  </channel>
</rss>

