<?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 Year on Year Comparison in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Year-on-Year-Comparison/m-p/794521#M280803</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 am trying to create a year on year comparison on my dashboard&lt;/P&gt;&lt;P&gt;I have two text boxes one displaying current year sales and another displaying prev year sales&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Current Year" =num(sum({$&amp;lt; [Fiscal Year] = {$(vMAXYEAR)},[Year-Month]={"&amp;lt;=$(=(vMAXYM))"}&amp;gt;} [Invoiced Amount])/1000,'#,##0')"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Previous Year="=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;The problem with the previous year is that it doesnt display MTD for the current month , so for example for 2014 it is displaying the full month of Jan comparing the two list boxes this is incorrect .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have tried&amp;nbsp; "If( Day(DATE_KEY) &amp;lt;= Day(Today()), 1, 0) as &lt;SPAN style="color: #0000ff;"&gt;IsInMTD&lt;/SPAN&gt;" in the script&amp;nbsp; and then &lt;/P&gt;&lt;P&gt;using the flag in the set analysis expression&amp;nbsp; as per below &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))"},&lt;SPAN style="color: #0000ff;"&gt;IsInMTD={1}&lt;/SPAN&gt;&amp;gt;} [Invoiced Amount])/1000,'#,##0')"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This doesnt give me correct figures... any idea what I could be doing wrong... or perhaps a simpler solution ?&lt;/P&gt;&lt;P&gt;I need to use the expression in a number of places so im trying to keep the expression as simple as possible as not to use up to much resources...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 15 Jan 2015 05:16:37 GMT</pubDate>
    <dc:creator>rido1421</dc:creator>
    <dc:date>2015-01-15T05:16:37Z</dc:date>
    <item>
      <title>Year on Year Comparison</title>
      <link>https://community.qlik.com/t5/QlikView/Year-on-Year-Comparison/m-p/794521#M280803</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 am trying to create a year on year comparison on my dashboard&lt;/P&gt;&lt;P&gt;I have two text boxes one displaying current year sales and another displaying prev year sales&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Current Year" =num(sum({$&amp;lt; [Fiscal Year] = {$(vMAXYEAR)},[Year-Month]={"&amp;lt;=$(=(vMAXYM))"}&amp;gt;} [Invoiced Amount])/1000,'#,##0')"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Previous Year="=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;The problem with the previous year is that it doesnt display MTD for the current month , so for example for 2014 it is displaying the full month of Jan comparing the two list boxes this is incorrect .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have tried&amp;nbsp; "If( Day(DATE_KEY) &amp;lt;= Day(Today()), 1, 0) as &lt;SPAN style="color: #0000ff;"&gt;IsInMTD&lt;/SPAN&gt;" in the script&amp;nbsp; and then &lt;/P&gt;&lt;P&gt;using the flag in the set analysis expression&amp;nbsp; as per below &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))"},&lt;SPAN style="color: #0000ff;"&gt;IsInMTD={1}&lt;/SPAN&gt;&amp;gt;} [Invoiced Amount])/1000,'#,##0')"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This doesnt give me correct figures... any idea what I could be doing wrong... or perhaps a simpler solution ?&lt;/P&gt;&lt;P&gt;I need to use the expression in a number of places so im trying to keep the expression as simple as possible as not to use up to much resources...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Jan 2015 05:16:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Year-on-Year-Comparison/m-p/794521#M280803</guid>
      <dc:creator>rido1421</dc:creator>
      <dc:date>2015-01-15T05:16: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/794522#M280804</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't see any obvious issue in what you posted. Can you post a document that demonstrates the problem?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Jan 2015 10:09:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Year-on-Year-Comparison/m-p/794522#M280804</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2015-01-15T10:09:14Z</dc:date>
    </item>
    <item>
      <title>Re: Year on Year Comparison</title>
      <link>https://community.qlik.com/t5/QlikView/Year-on-Year-Comparison/m-p/794523#M280805</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Add a test table box showing DATEKEY and IsInMTD to test that the flag is correct in each year. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Jan 2015 10:18:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Year-on-Year-Comparison/m-p/794523#M280805</guid>
      <dc:creator>Colin-Albert</dc:creator>
      <dc:date>2015-01-15T10:18:03Z</dc:date>
    </item>
    <item>
      <title>Re: Year on Year Comparison</title>
      <link>https://community.qlik.com/t5/QlikView/Year-on-Year-Comparison/m-p/794524#M280806</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Gysbert &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My problem here seems to be that "If( Day(DATE_KEY) &amp;lt;= Day(Today()), 1, 0) as &lt;SPAN style="color: #0000ff;"&gt;IsInMTD only gives &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;the current month as a flag, I would need the previous&amp;nbsp; months of the fiscal year + the amount of days in the current month&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;Sum({&amp;lt;&lt;SPAN style="color: #0000ff;"&gt;IsInMTD={1},[Fiscal Year]={$(vPREVYEAR)}&lt;/SPAN&gt;&amp;gt;}[Invoiced Amount])&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;will only give me the invoiced amount last years fiscal month equivalent to this year &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;so in this case this months fiscal month is 4 and the above expression only gives the invoiced amount for 2014 fiscal month 4(Which is the current month)&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;I need an accumulative figure fiscal month 1+2+3+4(up until todays date)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;so that I can do the comparison ,current year vs Prev year&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;I hope my explanation is not to confusing &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;Thank you&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Jan 2015 09:39:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Year-on-Year-Comparison/m-p/794524#M280806</guid>
      <dc:creator>rido1421</dc:creator>
      <dc:date>2015-01-27T09:39:12Z</dc:date>
    </item>
  </channel>
</rss>

