<?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 and max value in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Set-analysis-and-max-value/m-p/747417#M266719</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks you both, this works indeed.&lt;/P&gt;&lt;P&gt;Do you have any insight on what is happening, or any pointer to an in-depth explanation if this syntax ? This remains quite magical to me...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 14 Nov 2014 13:11:37 GMT</pubDate>
    <dc:creator />
    <dc:date>2014-11-14T13:11:37Z</dc:date>
    <item>
      <title>Set analysis and max value</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-and-max-value/m-p/747414#M266716</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to use set analysis to show each month of current year against previous year (quite common).&lt;/P&gt;&lt;P&gt;My problem is when no year is selected : then, I want to choose the max year of my data model.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to use this expression to get the previous year:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=(max(Year) - 1)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now, here is my problem: I have three years in my data (2010, 2011, and 2012).&lt;/P&gt;&lt;P&gt;I have a text expression that shows =(max(Year) - 1).&lt;/P&gt;&lt;P&gt;If 2011 is selected, it shows 2010. If 2012 is selected, 2011. If nothing is selected, 2011. So far so good.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now I have a bar chart, with month as a dimension, and the following expression :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=Sum( {$&amp;lt;Month =, Year = {"=(max(Year)-1)"}&amp;gt;} Sales)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now, if I select 2012, sales for each month of 2011 are shown. (and text expression shows 2011, as said).&lt;/P&gt;&lt;P&gt;BUT... if I select nothing, text expression still shows 2011, but the chart shows the sum of all Sales for each month !&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I must be missing some fundamental point of Qlikview internals... so any help would be appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Franck&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Nov 2014 11:30:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-and-max-value/m-p/747414#M266716</guid>
      <dc:creator />
      <dc:date>2014-11-14T11:30:29Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis and max value</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-and-max-value/m-p/747415#M266717</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try below expression:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sum({&amp;lt;Month=,Year={"=$(=Max(Year)-1)"}&amp;gt;}Sales)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HTH&lt;BR /&gt;sushil&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Nov 2014 11:38:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-and-max-value/m-p/747415#M266717</guid>
      <dc:creator>sushil353</dc:creator>
      <dc:date>2014-11-14T11:38:27Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis and max value</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-and-max-value/m-p/747416#M266718</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;This should work: &lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;=Sum( {$&amp;lt;Month =, Year = {$(=max(Year)-1)}&amp;gt;} Sales)&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Nov 2014 11:41:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-and-max-value/m-p/747416#M266718</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2014-11-14T11:41:32Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis and max value</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-and-max-value/m-p/747417#M266719</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks you both, this works indeed.&lt;/P&gt;&lt;P&gt;Do you have any insight on what is happening, or any pointer to an in-depth explanation if this syntax ? This remains quite magical to me...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Nov 2014 13:11:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-and-max-value/m-p/747417#M266719</guid>
      <dc:creator />
      <dc:date>2014-11-14T13:11:37Z</dc:date>
    </item>
  </channel>
</rss>

