<?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: year on year comparison in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/year-on-year-comparison/m-p/770409#M273510</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Try&lt;/P&gt;&lt;P&gt;=Sum({&amp;lt;FY={$(=Max(FY)-1)},MonthOrder = {"&amp;lt;=$(= max({&amp;lt;FY={$(=max(FY))}&amp;gt;} MonthOrder))"}&amp;gt;}&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;[Invoiced Amount])&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Where MonthOrder is month no.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Arun&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 27 Jan 2015 08:35:59 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2015-01-27T08:35:59Z</dc:date>
    <item>
      <title>year on year comparison</title>
      <link>https://community.qlik.com/t5/QlikView/year-on-year-comparison/m-p/770406#M273507</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi There&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have the below fields&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[Invoiced Amount],&lt;/P&gt;&lt;P&gt;[Fiscal Year],&lt;/P&gt;&lt;P&gt;[Fiscal Month],&lt;/P&gt;&lt;P&gt;Date&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have two text boxes one for current Year and one for Previous Year&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in my Current Year =Sum({&amp;lt;[Fiscal Year]={$(vMaxYear)}&amp;gt;}[Invoiced Amount])&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /// This works fine&lt;/P&gt;&lt;P&gt;How would I do previous year so that it is only up until Todays date or Yesterday.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ive used&lt;/P&gt;&lt;P&gt;If( DayNumberOfYear(Date) &amp;lt;= DayNumberOfYear(Today()), 1, 0 ) as IsInYTD in the script which will give me current months current days flag&lt;/P&gt;&lt;P&gt;for each year.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;any idea what I could do in my previous year text box with the above information...?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Jan 2015 07:48:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/year-on-year-comparison/m-p/770406#M273507</guid>
      <dc:creator>rido1421</dc:creator>
      <dc:date>2015-01-27T07:48:53Z</dc:date>
    </item>
    <item>
      <title>Re: year on year comparison</title>
      <link>https://community.qlik.com/t5/QlikView/year-on-year-comparison/m-p/770407#M273508</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;You can try like this for &lt;/P&gt;&lt;P&gt;previous year =Sum({&amp;lt;FY={$(=Max(FY)-1)}&amp;gt;}&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;[Invoiced Amount])&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Arun&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Jan 2015 08:02:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/year-on-year-comparison/m-p/770407#M273508</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-01-27T08:02:22Z</dc:date>
    </item>
    <item>
      <title>Re: year on year comparison</title>
      <link>https://community.qlik.com/t5/QlikView/year-on-year-comparison/m-p/770408#M273509</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Arun&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That will give me Sum for the total of last year...&lt;/P&gt;&lt;P&gt;I would need it to give me a comparison of last year to this year... YTD...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Jan 2015 08:04:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/year-on-year-comparison/m-p/770408#M273509</guid>
      <dc:creator>rido1421</dc:creator>
      <dc:date>2015-01-27T08:04:37Z</dc:date>
    </item>
    <item>
      <title>Re: year on year comparison</title>
      <link>https://community.qlik.com/t5/QlikView/year-on-year-comparison/m-p/770409#M273510</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Try&lt;/P&gt;&lt;P&gt;=Sum({&amp;lt;FY={$(=Max(FY)-1)},MonthOrder = {"&amp;lt;=$(= max({&amp;lt;FY={$(=max(FY))}&amp;gt;} MonthOrder))"}&amp;gt;}&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;[Invoiced Amount])&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Where MonthOrder is month no.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Arun&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Jan 2015 08:35:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/year-on-year-comparison/m-p/770409#M273510</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-01-27T08:35:59Z</dc:date>
    </item>
    <item>
      <title>Re: year on year comparison</title>
      <link>https://community.qlik.com/t5/QlikView/year-on-year-comparison/m-p/770410#M273511</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Arun&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it doesnt seem to work...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;below is the expression I am currently using which does seem to work... but as you can imagine&lt;/P&gt;&lt;P&gt;it is resource intensive, I need would like to do it in the script to try and simplify the expression&lt;/P&gt;&lt;P&gt;it is making my model slow.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=(If(GetFieldSelections([Month Abbrev])= vCurrentMonth&amp;nbsp; and GetSelectedCount([Day Number in Month])=1,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;num(sum({$&amp;lt; [Fiscal Year] = {$(vPREVYEAR)},[Year-Month]={"&amp;lt;=$(=(vMAXLASTYEAR))"}&amp;gt;} [Invoiced Amount])/1000,'#,##0'),&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;((if(&lt;/P&gt;&lt;P&gt; GetFieldSelections([Month Abbrev])= vCurrentMonth &lt;/P&gt;&lt;P&gt;or&amp;nbsp; GetSelectedCount([Month Abbrev])&amp;lt;1&lt;/P&gt;&lt;P&gt; or GetSelectedCount([Day Number in Month])&amp;gt;1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(vPREVYEAR&amp;amp;' : '&amp;amp;Num (((sum({$&amp;lt; [Fiscal Year] = {$(vPREVYEAR)},[Year-Month]={"&amp;lt;=$(=(vMAXLASTYEAR-1))"}&amp;gt;} [Invoiced Amount])/1000)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;+&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;num(sum({$&amp;lt; [Fiscal Year] = {$(vPREVYEAR)},[Month Abbrev]={$(vCurrentMonth)},[Day Number in Month]={"&amp;lt;=$(=(vCurrentDay))"}&amp;gt;} [Invoiced Amount])/1000)),'#,##0'))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(vPREVYEAR&amp;amp;' : '&amp;amp;num(sum({$&amp;lt; [Fiscal Year] = {$(vPREVYEAR)},[Year-Month]={"&amp;lt;=$(=(vMAXLASTYEAR))"}&amp;gt;} [Invoiced Amount])/1000,'#,##0')))))))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Jan 2015 08:43:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/year-on-year-comparison/m-p/770410#M273511</guid>
      <dc:creator>rido1421</dc:creator>
      <dc:date>2015-01-27T08:43:39Z</dc:date>
    </item>
  </channel>
</rss>

