<?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 (max year and last year) in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/set-analysis-max-year-and-last-year/m-p/1007582#M467766</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What is the format of your year field, is it 2012, 2013, 2014....? Would you be able to share a sample?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 19 Oct 2015 10:39:04 GMT</pubDate>
    <dc:creator>sunny_talwar</dc:creator>
    <dc:date>2015-10-19T10:39:04Z</dc:date>
    <item>
      <title>set analysis (max year and last year)</title>
      <link>https://community.qlik.com/t5/QlikView/set-analysis-max-year-and-last-year/m-p/1007581#M467765</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;There something wrong in expressions I made:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This year sales amount:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #0000ff;"&gt; Sum({$&amp;lt;Year={$(=Max(Year))}&amp;gt;}[Sales Amount])&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Last year sales amount&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #3366ff;"&gt; &lt;SPAN style="color: #0000ff;"&gt;Sum({$&amp;lt;Year={$(=Max(Year)-1)}&amp;gt;}[Sales Amount])&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sales amount is the same for both of them and it shouldn't be. And year is not max(year). Actually, this just gives a sum of all years or sum of selected year(s). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There was ei trigger on sheet (on opening) where max(year) was automatically selected, but I removed that.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What's wrong in the expressions?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Oct 2015 10:33:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/set-analysis-max-year-and-last-year/m-p/1007581#M467765</guid>
      <dc:creator />
      <dc:date>2015-10-19T10:33:24Z</dc:date>
    </item>
    <item>
      <title>Re: set analysis (max year and last year)</title>
      <link>https://community.qlik.com/t5/QlikView/set-analysis-max-year-and-last-year/m-p/1007582#M467766</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What is the format of your year field, is it 2012, 2013, 2014....? Would you be able to share a sample?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Oct 2015 10:39:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/set-analysis-max-year-and-last-year/m-p/1007582#M467766</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2015-10-19T10:39:04Z</dc:date>
    </item>
    <item>
      <title>Re: set analysis (max year and last year)</title>
      <link>https://community.qlik.com/t5/QlikView/set-analysis-max-year-and-last-year/m-p/1007583#M467767</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;=Only({$&amp;lt;Year={$(=Max(Year)-1)}&amp;gt;}Year)&lt;/P&gt;&lt;P&gt;=Only({$&amp;lt;Year={$(=Max(Year))}&amp;gt;}Year)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;These two expression working fine for me.&lt;/P&gt;&lt;P&gt;Remove only() and use your function.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Oct 2015 10:39:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/set-analysis-max-year-and-last-year/m-p/1007583#M467767</guid>
      <dc:creator>jsingh71</dc:creator>
      <dc:date>2015-10-19T10:39:58Z</dc:date>
    </item>
    <item>
      <title>Re: set analysis (max year and last year)</title>
      <link>https://community.qlik.com/t5/QlikView/set-analysis-max-year-and-last-year/m-p/1007584#M467768</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, it is 2012, 2013... Unfortunately I can't make sample file right now.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Oct 2015 10:49:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/set-analysis-max-year-and-last-year/m-p/1007584#M467768</guid>
      <dc:creator />
      <dc:date>2015-10-19T10:49:57Z</dc:date>
    </item>
    <item>
      <title>Re: set analysis (max year and last year)</title>
      <link>https://community.qlik.com/t5/QlikView/set-analysis-max-year-and-last-year/m-p/1007585#M467769</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Only other thing I can think of is, if your Year and [Sales Amount] are not connected to each other. Can you may be share a snapshot of your datamodel?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Oct 2015 10:56:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/set-analysis-max-year-and-last-year/m-p/1007585#M467769</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2015-10-19T10:56:17Z</dc:date>
    </item>
    <item>
      <title>Re: set analysis (max year and last year)</title>
      <link>https://community.qlik.com/t5/QlikView/set-analysis-max-year-and-last-year/m-p/1007586#M467770</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry, I can't do that either now, but Sales Amount and Year are both in a same table.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Oct 2015 11:06:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/set-analysis-max-year-and-last-year/m-p/1007586#M467770</guid>
      <dc:creator />
      <dc:date>2015-10-19T11:06:00Z</dc:date>
    </item>
    <item>
      <title>Re: set analysis (max year and last year)</title>
      <link>https://community.qlik.com/t5/QlikView/set-analysis-max-year-and-last-year/m-p/1007587#M467771</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;-Can you please check the Date field is in which format .(DD/MM/YYYY)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Upload your Calendar Script.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This may help to solve it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Bunny.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Oct 2015 11:08:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/set-analysis-max-year-and-last-year/m-p/1007587#M467771</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-10-19T11:08:42Z</dc:date>
    </item>
    <item>
      <title>Re: set analysis (max year and last year)</title>
      <link>https://community.qlik.com/t5/QlikView/set-analysis-max-year-and-last-year/m-p/1007588#M467772</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't see a&lt;SPAN style="color: #575757;"&gt;nything wrong with your syntax, the only thing you can try (although I don't think it will make any difference) is to add single quotes within your set analysis:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;STRONG style="color: #575757;"&gt;Sum({$&amp;lt;Year={&lt;SPAN style="color: #ff0000;"&gt;'&lt;/SPAN&gt;$(=Max(Year))&lt;SPAN style="color: #ff0000;"&gt;'&lt;/SPAN&gt;}&amp;gt;}[Sales Amount])&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Oct 2015 11:09:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/set-analysis-max-year-and-last-year/m-p/1007588#M467772</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2015-10-19T11:09:45Z</dc:date>
    </item>
    <item>
      <title>Re: set analysis (max year and last year)</title>
      <link>https://community.qlik.com/t5/QlikView/set-analysis-max-year-and-last-year/m-p/1007589#M467773</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Field name is case sensitive. Is it &lt;STRONG&gt;year&lt;/STRONG&gt; or &lt;STRONG&gt;Year&lt;/STRONG&gt;? And check :&lt;A href="https://community.qlik.com/docs/DOC-1290"&gt;Preparing examples for Upload - Reduction and Data Scrambling&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Oct 2015 11:12:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/set-analysis-max-year-and-last-year/m-p/1007589#M467773</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2015-10-19T11:12:43Z</dc:date>
    </item>
    <item>
      <title>Re: set analysis (max year and last year)</title>
      <link>https://community.qlik.com/t5/QlikView/set-analysis-max-year-and-last-year/m-p/1007590#M467774</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;STRONG&gt;Hi,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Just cross check your values by using the expression like&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Sum({$&amp;lt;Year={&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #ff0000;"&gt;'&lt;/SPAN&gt;2015&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #ff0000;"&gt;'&lt;/SPAN&gt;}&amp;gt;}[Sales Amount])&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;what is the result for 2015.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Then check for 2014.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;you may find out where the mistake will goes..&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Oct 2015 11:17:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/set-analysis-max-year-and-last-year/m-p/1007590#M467774</guid>
      <dc:creator>krishna20</dc:creator>
      <dc:date>2015-10-19T11:17:05Z</dc:date>
    </item>
    <item>
      <title>Re: set analysis (max year and last year)</title>
      <link>https://community.qlik.com/t5/QlikView/set-analysis-max-year-and-last-year/m-p/1007591#M467775</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;From what you wrote, &lt;SPAN style="font-size: 13.3333px;"&gt;same amount for max(year) and max(year) -1), &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;it seems your set modifiers (&lt;SPAN style="color: #0000ff; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Year={$(=Max(Year)-1)}) &lt;/SPAN&gt; doesn't work&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Maybe your field isn't Year (year?) or the field is Year but you don't have an association between Year (the table with Year field) and Sales Amount (the table with ...)&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Oct 2015 11:31:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/set-analysis-max-year-and-last-year/m-p/1007591#M467775</guid>
      <dc:creator>maxgro</dc:creator>
      <dc:date>2015-10-19T11:31:43Z</dc:date>
    </item>
    <item>
      <title>Re: set analysis (max year and last year)</title>
      <link>https://community.qlik.com/t5/QlikView/set-analysis-max-year-and-last-year/m-p/1007592#M467776</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Sum({$&amp;lt;Year={&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #ff0000;"&gt;'&lt;/SPAN&gt;2015&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #ff0000;"&gt;'&lt;/SPAN&gt;}&amp;gt;}[Sales Amount]) - expression works, but (&lt;SPAN style="color: #0000ff; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Year={$(=Max(Year))}) &lt;/SPAN&gt;&lt;/STRONG&gt;doesn't. There is no calendar at all. Year field is in "fact" table and that's what I am using.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Oct 2015 06:45:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/set-analysis-max-year-and-last-year/m-p/1007592#M467776</guid>
      <dc:creator />
      <dc:date>2015-10-22T06:45:52Z</dc:date>
    </item>
    <item>
      <title>Re: set analysis (max year and last year)</title>
      <link>https://community.qlik.com/t5/QlikView/set-analysis-max-year-and-last-year/m-p/1007593#M467777</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;remove the label of your expression (with max(Year)), go over the label with the mouse and look at the value you get for Max(Year) to check if you get something &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="1.png" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/102842_1.png" style="height: auto; width: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or post a small example of your problem&lt;/P&gt;&lt;P&gt;(this can be useful to reduce and protect the data &lt;A href="https://community.qlik.com/docs/DOC-1290"&gt;Preparing examples for Upload - Reduction and Data Scrambling&lt;/A&gt;)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Oct 2015 18:07:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/set-analysis-max-year-and-last-year/m-p/1007593#M467777</guid>
      <dc:creator>maxgro</dc:creator>
      <dc:date>2015-10-22T18:07:38Z</dc:date>
    </item>
    <item>
      <title>Re: set analysis (max year and last year)</title>
      <link>https://community.qlik.com/t5/QlikView/set-analysis-max-year-and-last-year/m-p/1007594#M467778</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Have you tried using max(Year) and max(Year,2) which calls the rank function instead of relying on the calc of Year-1?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Oct 2015 18:39:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/set-analysis-max-year-and-last-year/m-p/1007594#M467778</guid>
      <dc:creator>erjohnso</dc:creator>
      <dc:date>2015-10-30T18:39:04Z</dc:date>
    </item>
    <item>
      <title>Re: set analysis (max year and last year)</title>
      <link>https://community.qlik.com/t5/QlikView/set-analysis-max-year-and-last-year/m-p/1007595#M467779</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is working for me&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;last year:&lt;/P&gt;&lt;P&gt;Calender.Year = {$(#=Only(Num(Calender.Year)-1))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;current year:&lt;/P&gt;&lt;P&gt;Calender.Year = {$(#=Only(Num(Calender.Year)))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Nov 2015 12:09:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/set-analysis-max-year-and-last-year/m-p/1007595#M467779</guid>
      <dc:creator>lars_plenge</dc:creator>
      <dc:date>2015-11-23T12:09:43Z</dc:date>
    </item>
    <item>
      <title>Re: set analysis (max year and last year)</title>
      <link>https://community.qlik.com/t5/QlikView/set-analysis-max-year-and-last-year/m-p/1007596#M467780</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hello ville,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; make use of this expression to get max year sales &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;=sum({&amp;lt;year={"$(=max({&amp;lt;year&amp;gt;}year))"}&amp;gt;}[sales revenue])&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;Ashok&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 May 2016 06:17:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/set-analysis-max-year-and-last-year/m-p/1007596#M467780</guid>
      <dc:creator />
      <dc:date>2016-05-02T06:17:51Z</dc:date>
    </item>
    <item>
      <title>Re: set analysis (max year and last year)</title>
      <link>https://community.qlik.com/t5/QlikView/set-analysis-max-year-and-last-year/m-p/1007597#M467781</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sunny, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;what if the same expression , and i need to add in max(Month) as well?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;count({$&amp;lt;Year={'$(=Max(Year))'}&amp;gt;}ref_number)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rgds,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Jim&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Oct 2016 09:12:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/set-analysis-max-year-and-last-year/m-p/1007597#M467781</guid>
      <dc:creator>jim_chan</dc:creator>
      <dc:date>2016-10-17T09:12:35Z</dc:date>
    </item>
  </channel>
</rss>

