<?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: YTD Calculation in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/YTD-Calculation/m-p/342074#M1176220</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Hi All , Thanks for the replies. However i want to ask you regarding the above case. I have a situation in which i want YTD for 2 regions from Jan - Apr and for 1 region Jan- Mar. How do i go about it in a single set statement? Is there any way of doing that so that when i click on the region it automatically calculates for the above time span? In short- I want if the region is Europe or Asia, then calculate till Jan to Mar and if the region is North AMerica or any other region , then calculate till Jan to Apr.&amp;nbsp; Thanks- Anirban&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 16 May 2012 04:45:54 GMT</pubDate>
    <dc:creator />
    <dc:date>2012-05-16T04:45:54Z</dc:date>
    <item>
      <title>YTD Calculation</title>
      <link>https://community.qlik.com/t5/QlikView/YTD-Calculation/m-p/342069#M1176215</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Hi All,&amp;nbsp; I have two sets of Data ( Previous Year sales and current year sales) on a monthly basis for eg- Jan11 to dec11 and jan12 to dec12 side by side . I need to calclulate YTD for them. For eg- Previous Year April sales to current year april sales. I need a solution so that it automatically calculates the remaining month's YTD whenever i put the data in them.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Apr 2012 05:24:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/YTD-Calculation/m-p/342069#M1176215</guid>
      <dc:creator />
      <dc:date>2012-04-09T05:24:18Z</dc:date>
    </item>
    <item>
      <title>YTD Calculation</title>
      <link>https://community.qlik.com/t5/QlikView/YTD-Calculation/m-p/342070#M1176216</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; try this:&lt;/P&gt;&lt;P&gt;Sum(&lt;/P&gt;&lt;P&gt; {&lt;/P&gt;&lt;P&gt; &amp;lt;Year = {$(=Max(Year))}, Month = {$(=Month(vTodaysDate))}&amp;gt;}&lt;/P&gt;&lt;P&gt; Amount&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; )&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Apr 2012 05:41:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/YTD-Calculation/m-p/342070#M1176216</guid>
      <dc:creator>jaspal_icon</dc:creator>
      <dc:date>2012-04-09T05:41:02Z</dc:date>
    </item>
    <item>
      <title>YTD Calculation</title>
      <link>https://community.qlik.com/t5/QlikView/YTD-Calculation/m-p/342071#M1176217</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Hi Jaspal- I tried the above set statement but its not working. Let me brief you a bit more about my YTD calculation its actually (Current Year Sales-Previous Year Sales)/Current Year Sales and this sales figure is a cumulative one. For eg- if its for the month of April..i need to add the figures from Jan to Apr last year and jan to Apr current yearand then do the calculation. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Apr 2012 06:04:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/YTD-Calculation/m-p/342071#M1176217</guid>
      <dc:creator />
      <dc:date>2012-04-09T06:04:38Z</dc:date>
    </item>
    <item>
      <title>YTD Calculation</title>
      <link>https://community.qlik.com/t5/QlikView/YTD-Calculation/m-p/342072#M1176218</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="background-color: #ffffff; font-size: 12px; color: #636363; font-family: Arial;"&gt;use below code month should in number&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; font-size: 12px; color: #636363; font-family: Arial;"&gt;Sum(&lt;/P&gt;&lt;P style="background-color: #ffffff; font-size: 12px; color: #636363; font-family: Arial;"&gt;{&lt;/P&gt;&lt;P style="background-color: #ffffff; font-size: 12px; color: #636363; font-family: Arial;"&gt;&amp;lt;Year = {$(=Max(Year))}, Month = {"&amp;lt;=$(=max(Montthno))}"&amp;gt;}&lt;/P&gt;&lt;P style="background-color: #ffffff; font-size: 12px; color: #636363; font-family: Arial;"&gt;Amount&lt;/P&gt;&lt;P style="background-color: #ffffff; font-size: 12px; color: #636363; font-family: Arial;"&gt;&amp;nbsp;&amp;nbsp; )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope this helps&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Apr 2012 06:14:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/YTD-Calculation/m-p/342072#M1176218</guid>
      <dc:creator>SunilChauhan</dc:creator>
      <dc:date>2012-04-09T06:14:27Z</dc:date>
    </item>
    <item>
      <title>Re: YTD Calculation</title>
      <link>https://community.qlik.com/t5/QlikView/YTD-Calculation/m-p/342073#M1176219</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;&amp;nbsp; Use the expression in prevuious year when you select month it shows previous year current selection months data defaultly its show previous year whole data &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=&amp;nbsp;&amp;nbsp; Sum({&amp;lt;Year=, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; NumDate={'&amp;gt;=$(=(Num(YearStart(AddYears((selectedDate),-1)))))&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;=$(=(Num(AddYears((selectedDate),-1))))'}&amp;gt;}Data)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use the expression in current year .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=&amp;nbsp; Sum({&amp;lt;Year=, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; NumDate={'&amp;gt;=$(=(Num(YearStart((selectedDate),-1))))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;=$(=(Num((selectedDate),-1)))'}&amp;gt;}Data)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Where selectedDate = MakeDate(Max(Year),Max(Month),Max(Day))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Iyyappan.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Apr 2012 11:24:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/YTD-Calculation/m-p/342073#M1176219</guid>
      <dc:creator>v_iyyappan</dc:creator>
      <dc:date>2012-04-09T11:24:52Z</dc:date>
    </item>
    <item>
      <title>Re: YTD Calculation</title>
      <link>https://community.qlik.com/t5/QlikView/YTD-Calculation/m-p/342074#M1176220</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Hi All , Thanks for the replies. However i want to ask you regarding the above case. I have a situation in which i want YTD for 2 regions from Jan - Apr and for 1 region Jan- Mar. How do i go about it in a single set statement? Is there any way of doing that so that when i click on the region it automatically calculates for the above time span? In short- I want if the region is Europe or Asia, then calculate till Jan to Mar and if the region is North AMerica or any other region , then calculate till Jan to Apr.&amp;nbsp; Thanks- Anirban&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 May 2012 04:45:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/YTD-Calculation/m-p/342074#M1176220</guid>
      <dc:creator />
      <dc:date>2012-05-16T04:45:54Z</dc:date>
    </item>
    <item>
      <title>Re: YTD Calculation</title>
      <link>https://community.qlik.com/t5/QlikView/YTD-Calculation/m-p/342075#M1176221</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Anirban, &lt;/P&gt;&lt;P&gt;For a region you have a fix months range, which you already know. So you can have some variable say:&lt;/P&gt;&lt;P&gt;vStartDate and vEndDate&lt;/P&gt;&lt;P&gt;Now say you want to to Show 1 Jan 2012 to 31 Mar 2012&lt;/P&gt;&lt;P&gt;then set variable value:&lt;/P&gt;&lt;P&gt;vStartDate= Date(MakeDate('1-Jan'&amp;amp;vSelectedYear))&lt;/P&gt;&lt;P&gt;vEndDate=Date(MakeDate(if(Region=US,'31-Mar', if(Region=Europe, '30-Apr'))&amp;amp;vSelectedYear))&lt;/P&gt;&lt;P&gt;Now in your chart you can set the expression like:&lt;/P&gt;&lt;P&gt;Sum(If(SalesDate&amp;gt;=vStartDate and SalesDate&amp;lt;=vEndDate, Sales_Value))&lt;/P&gt;&lt;P&gt;Hope this will help&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Jaspal&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Jun 2012 07:23:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/YTD-Calculation/m-p/342075#M1176221</guid>
      <dc:creator>jaspal_icon</dc:creator>
      <dc:date>2012-06-26T07:23:47Z</dc:date>
    </item>
  </channel>
</rss>

