<?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 with Axes Min/Max, Should Not change on Filter in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Set-Analysis-with-Axes-Min-Max-Should-Not-change-on-Filter/m-p/1827818#M1214116</link>
    <description>&lt;P&gt;Thank you so much. This worked for me!&lt;/P&gt;</description>
    <pubDate>Tue, 10 Aug 2021 19:14:18 GMT</pubDate>
    <dc:creator>a272070</dc:creator>
    <dc:date>2021-08-10T19:14:18Z</dc:date>
    <item>
      <title>Set Analysis with Axes Min/Max, Should Not change on Filter</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-with-Axes-Min-Max-Should-Not-change-on-Filter/m-p/1827572#M1214094</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I am using a set analysis expression in my chart.&lt;/P&gt;&lt;P&gt;Sum({1&amp;lt;[Calendar Year] = {"$(=Max({1}[Calendar Year]))"}&amp;gt;} DISTINCT [Sales Percentage]) &amp;lt;-- Used for current year&lt;/P&gt;&lt;P&gt;Sum({1&amp;lt;[Calendar Year] = {"$(=Max({1}[Calendar Year])-1)"} &amp;gt;} DISTINCT [Sales Percentage]) &amp;lt;--- Used for previous year&lt;/P&gt;&lt;P&gt;The dimension for this chart is [Calendar Month].&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is the chart below that it makes whenever I put the min and max values in the axes tab. I put min(Sales percentage) and max(Sales percentage) for both the current year and previous year expressions in the scale section under the axes tab.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jhgty43_0-1628541580806.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/59891i13D3D3D42E9878A9/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jhgty43_0-1628541580806.png" alt="jhgty43_0-1628541580806.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;If I don't put the min and max values, then the chart looks like this, which is not as nice and spaced out.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jhgty43_1-1628541774386.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/59892iF4E277023DD577E8/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jhgty43_1-1628541774386.png" alt="jhgty43_1-1628541774386.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;The issue is, I don't want this chart to do anything when I filter, I want it to stay the same as the set analysis should with the {1} where they are currently as shown above...&lt;/P&gt;&lt;P&gt;But the issue is, when I filter and I have the min and max values in the axes tab, it does this:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jhgty43_2-1628541864381.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/59894i131AB8EAE0D0F174/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jhgty43_2-1628541864381.png" alt="jhgty43_2-1628541864381.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Is there a way to fix this so it does not change when filtering but I can also use the min and max axes values so that it looks like the second image at all times no matter what filter?&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;</description>
      <pubDate>Mon, 09 Aug 2021 20:47:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-with-Axes-Min-Max-Should-Not-change-on-Filter/m-p/1827572#M1214094</guid>
      <dc:creator>a272070</dc:creator>
      <dc:date>2021-08-09T20:47:38Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis with Axes Min/Max, Should Not change on Filter</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-with-Axes-Min-Max-Should-Not-change-on-Filter/m-p/1827576#M1214095</link>
      <description>&lt;P&gt;First you need to carry your set analysis to your min/max axis calculation.&amp;nbsp; I am doing &amp;gt;= max year -1 which will include both years.&lt;/P&gt;&lt;P&gt;min(&lt;SPAN&gt;{1&amp;lt;[Calendar Year] = {"&amp;gt;=$(=Max({1}[Calendar Year])-1)"}&amp;gt;} [Sales percentage])&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;max({1&amp;lt;[Calendar Year] = {"&amp;gt;=$(=Max({1}[Calendar Year])-1)"}&amp;gt;} [Sales percentage])&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;But this (and your original calculation) aren't aggregating Sales percentage by month for min/max... this is just the max row value.&amp;nbsp; That would only be the same if you have 1 value per month.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;If you do need to aggregate first it would be like this:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;=max({&amp;lt;[Delivery date] = {"&amp;gt;=$(=Max({1}[Calendar Year])-1)"}&amp;gt;}aggr(sum({&amp;lt;[Delivery date] = {"&amp;gt;=$(=Max({1}[Calendar Year])-1)"}&amp;gt;} [Sales percentage]), [Calendar Month]))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;and change outermost function to min.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 09 Aug 2021 21:21:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-with-Axes-Min-Max-Should-Not-change-on-Filter/m-p/1827576#M1214095</guid>
      <dc:creator>stevejoyce</dc:creator>
      <dc:date>2021-08-09T21:21:58Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis with Axes Min/Max, Should Not change on Filter</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-with-Axes-Min-Max-Should-Not-change-on-Filter/m-p/1827818#M1214116</link>
      <description>&lt;P&gt;Thank you so much. This worked for me!&lt;/P&gt;</description>
      <pubDate>Tue, 10 Aug 2021 19:14:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-with-Axes-Min-Max-Should-Not-change-on-Filter/m-p/1827818#M1214116</guid>
      <dc:creator>a272070</dc:creator>
      <dc:date>2021-08-10T19:14:18Z</dc:date>
    </item>
  </channel>
</rss>

