<?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 YTD calculation in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/set-analysis-YTD-calculation/m-p/800838#M282645</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yeah....good for you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 16 Jan 2015 10:38:38 GMT</pubDate>
    <dc:creator>kavita25</dc:creator>
    <dc:date>2015-01-16T10:38:38Z</dc:date>
    <item>
      <title>set analysis YTD calculation</title>
      <link>https://community.qlik.com/t5/QlikView/set-analysis-YTD-calculation/m-p/800830#M282637</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am using this expression to calculate sum of revenue for previous year &lt;/P&gt;&lt;P&gt;=sum({$&amp;lt;Year={$(=Max(Year)-1)},Month={"&amp;lt;=$(=max(Month))"}&amp;gt;}Revenue)&lt;/P&gt;&lt;P&gt;but i want this expression to show same period revenue for previous year as showing in current year&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for ex&amp;nbsp; if in 2015 there is only one month January it will be compare to jan month of 2014 &lt;/P&gt;&lt;P&gt;and if there are three months in 2015 it will compare to same three months of 2014&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Jan 2015 06:29:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/set-analysis-YTD-calculation/m-p/800830#M282637</guid>
      <dc:creator />
      <dc:date>2015-01-16T06:29:12Z</dc:date>
    </item>
    <item>
      <title>Re: set analysis YTD calculation</title>
      <link>https://community.qlik.com/t5/QlikView/set-analysis-YTD-calculation/m-p/800831#M282638</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 like this if you have a date field&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For YTD&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;=sum({$&amp;lt;Year=,Month=, DateFieldName={'&amp;gt;=$(=YearStart(Today()))&amp;lt;=$(=Today())'}&amp;gt;}Revenue)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;For Previous Year YTD&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;=sum({$&amp;lt;Year=,Month=, DateFieldName={'&amp;gt;=$(=YearStart(Today(), -1))&amp;lt;=$(=AddYears(Today(), -1))'}&amp;gt;}Revenue)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Hope this helps you.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Jagan.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Jan 2015 06:52:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/set-analysis-YTD-calculation/m-p/800831#M282638</guid>
      <dc:creator>jagan</dc:creator>
      <dc:date>2015-01-16T06:52:27Z</dc:date>
    </item>
    <item>
      <title>Re: set analysis YTD calculation</title>
      <link>https://community.qlik.com/t5/QlikView/set-analysis-YTD-calculation/m-p/800832#M282639</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;For Current year&lt;/P&gt;&lt;P&gt;sum({&amp;lt;Year={$(=Only(Year))},Month= {"&amp;lt;=$(=max({&amp;lt;Year={$(=Only(Year))}&amp;gt;} Month))"}&amp;gt;}Revenue)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For Previous Year&lt;/P&gt;&lt;P&gt;sum({$&amp;lt;Year={$(=Only(Year)-1)},Month= {"&amp;lt;=$(=max({&amp;lt;Year={$(=Only(Year))}&amp;gt;} Month))"}&amp;gt;}Revenue)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If You are using Master Calendar you can create flag for the same. &lt;/P&gt;&lt;P&gt;For&amp;nbsp; Current Year YTD&lt;/P&gt;&lt;P&gt; if(if(Month(date(Floor(Date)))&amp;lt;=3,(Year(date(Floor(Date)))-1)&amp;amp;'-'&amp;amp;(Year(date(Floor(Date)))),(Year(date(Floor(Date))))&amp;amp;'-'&amp;amp;(Year(date(Floor(Date)))+1))=if(Month(((today())))&amp;lt;=3,(Year(((today())))-1)&amp;amp;'-'&amp;amp;(Year(((today())))),(Year(((today()))))&amp;amp;'-'&amp;amp;(Year(((today())))+1)),1,0) as YTD_Flag,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For Prior Year YTD&lt;/P&gt;&lt;P&gt;inyeartodate(Date, $(vDateToday), -1,4)* -1&amp;nbsp; AS LastYTDFlag &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps you&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Kavita&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Jan 2015 07:00:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/set-analysis-YTD-calculation/m-p/800832#M282639</guid>
      <dc:creator>kavita25</dc:creator>
      <dc:date>2015-01-16T07:00:37Z</dc:date>
    </item>
    <item>
      <title>Re: set analysis YTD calculation</title>
      <link>https://community.qlik.com/t5/QlikView/set-analysis-YTD-calculation/m-p/800833#M282640</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Jagan &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That was helpful but it is not working for 2014 or 2013 bcz&amp;nbsp; of today() can i replace this with my transactiondate?&lt;/P&gt;&lt;P&gt;pls suggest &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Jan 2015 07:14:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/set-analysis-YTD-calculation/m-p/800833#M282640</guid>
      <dc:creator />
      <dc:date>2015-01-16T07:14:05Z</dc:date>
    </item>
    <item>
      <title>Re: set analysis YTD calculation</title>
      <link>https://community.qlik.com/t5/QlikView/set-analysis-YTD-calculation/m-p/800834#M282641</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;This will work &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12px; background-color: #ffffee;"&gt;=sum({$&amp;lt;Year=,Month=, DateFieldName={'&amp;gt;=$(=YearStart(Today(), -1))&amp;lt;=$(=AddYears(Today(), -1))'}&amp;gt;}Revenue)&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: 12px; background-color: #ffffee;"&gt;&lt;BR /&gt;&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: 12px; background-color: #ffffee;"&gt;because I am using &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12px; background-color: #ffffee;"&gt;=YearStart(Today(), -1) this will give Jan-1-2014 and &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12px; background-color: #ffffee;"&gt;=AddYears(Today(), -1) will give Jan-16-2014&lt;/SPAN&gt;&lt;/SPAN&gt;&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: 12px; background-color: #ffffee;"&gt;&lt;BR /&gt;&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: 12px; background-color: #ffffee;"&gt;I am not sure why it is not working for you.&amp;nbsp; Are you selecting any other date fields other&amp;nbsp; than &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12px; background-color: #ffffee;"&gt;Year=,Month=?&amp;nbsp; If yes then you have to exclude the selections by using (Quarter=), etc.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 12px; background-color: #ffffee; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&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: 12px; background-color: #ffffee;"&gt;&lt;BR /&gt;&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: 12px; background-color: #ffffee;"&gt;Regards,&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: 12px; background-color: #ffffee;"&gt;Jagan.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Jan 2015 08:34:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/set-analysis-YTD-calculation/m-p/800834#M282641</guid>
      <dc:creator>jagan</dc:creator>
      <dc:date>2015-01-16T08:34:05Z</dc:date>
    </item>
    <item>
      <title>Re: set analysis YTD calculation</title>
      <link>https://community.qlik.com/t5/QlikView/set-analysis-YTD-calculation/m-p/800835#M282642</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HEy,&lt;/P&gt;&lt;P&gt;You mean to say either go with the above given script or with Master calendar script. IS it so ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Jan 2015 10:06:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/set-analysis-YTD-calculation/m-p/800835#M282642</guid>
      <dc:creator>nikhilgarg</dc:creator>
      <dc:date>2015-01-16T10:06:46Z</dc:date>
    </item>
    <item>
      <title>Re: set analysis YTD calculation</title>
      <link>https://community.qlik.com/t5/QlikView/set-analysis-YTD-calculation/m-p/800836#M282643</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yess.....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Above given script can be used directly in the expression, which is little bit complex.&lt;/P&gt;&lt;P&gt;And the same can be achieved by creating flags and directly can be use in expression which is simpler than the writing whole expression.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Jan 2015 10:15:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/set-analysis-YTD-calculation/m-p/800836#M282643</guid>
      <dc:creator>kavita25</dc:creator>
      <dc:date>2015-01-16T10:15:46Z</dc:date>
    </item>
    <item>
      <title>Re: set analysis YTD calculation</title>
      <link>https://community.qlik.com/t5/QlikView/set-analysis-YTD-calculation/m-p/800837#M282644</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok . Actually for me below script is easier than master calendar script.&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;For Current year&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;sum({&amp;lt;Year={$(=Only(Year))},Month= {"&amp;lt;=$(=max({&amp;lt;Year={$(=Only(Year))}&amp;gt;} Month))"}&amp;gt;}Revenue)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;For Previous Year&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;sum({$&amp;lt;Year={$(=Only(Year)-1)},Month= {"&amp;lt;=$(=max({&amp;lt;Year={$(=Only(Year))}&amp;gt;} Month))"}&amp;gt;}Revenue)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Jan 2015 10:18:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/set-analysis-YTD-calculation/m-p/800837#M282644</guid>
      <dc:creator>nikhilgarg</dc:creator>
      <dc:date>2015-01-16T10:18:38Z</dc:date>
    </item>
    <item>
      <title>Re: set analysis YTD calculation</title>
      <link>https://community.qlik.com/t5/QlikView/set-analysis-YTD-calculation/m-p/800838#M282645</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yeah....good for you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Jan 2015 10:38:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/set-analysis-YTD-calculation/m-p/800838#M282645</guid>
      <dc:creator>kavita25</dc:creator>
      <dc:date>2015-01-16T10:38:38Z</dc:date>
    </item>
    <item>
      <title>Re: set analysis YTD calculation</title>
      <link>https://community.qlik.com/t5/QlikView/set-analysis-YTD-calculation/m-p/1563156#M441467</link>
      <description>&lt;P&gt;am using this&amp;nbsp; script&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sum({&amp;lt;Year={$(=Only(Year))}&amp;gt;}Sales)&lt;/P&gt;&lt;P&gt;but the result is 0&lt;/P&gt;</description>
      <pubDate>Sun, 31 Mar 2019 05:41:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/set-analysis-YTD-calculation/m-p/1563156#M441467</guid>
      <dc:creator>Pdhondi</dc:creator>
      <dc:date>2019-03-31T05:41:58Z</dc:date>
    </item>
  </channel>
</rss>

