<?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: Transitioning year and pulling previous YTD data in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Transitioning-year-and-pulling-previous-YTD-data/m-p/1878635#M1216771</link>
    <description>&lt;P&gt;Your formula is still valid for Current YTD, for Previous YTD (PYTD) you need to create a new one:&lt;/P&gt;
&lt;P&gt;1.&amp;nbsp; Assuming that the values for Restated POS Year are all years, you will need to decrease in 1 the max year:&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;$(=Max([Restated POS Year])-1)&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;2. Optionally In script, create a new Flag IsInPTYD (is in Previous Year To Date) with value 1 for 2021 and 0 for current year and the rest of the years, or just remove that part from Set Analysis formula.&lt;/P&gt;
&lt;P&gt;Final version of formula with suggested changes:&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Sum( {$&amp;lt;IsInPYTD={1},[Restated POS Year] = {$(=Max([Restated POS Year])-1)}&amp;gt;} [Retail Sales Dollars])&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Regards.&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 07 Jan 2022 20:17:54 GMT</pubDate>
    <dc:creator>_Gerardo_</dc:creator>
    <dc:date>2022-01-07T20:17:54Z</dc:date>
    <item>
      <title>Transitioning year and pulling previous YTD data</title>
      <link>https://community.qlik.com/t5/QlikView/Transitioning-year-and-pulling-previous-YTD-data/m-p/1878612#M1216770</link>
      <description>&lt;P&gt;I am trying to pull YTD from a previous year (2021) now that we have transitioned into the new year. Previously, this is the expression I always used:&lt;/P&gt;
&lt;P&gt;Sum( {$&amp;lt;IsInYTD={1},[Restated POS Year] = {$(=Max([Restated POS Year]))}&amp;gt;} [Retail Sales Dollars])&lt;/P&gt;
&lt;P&gt;Is there a simple change I can make to this formula in order to still get full YTD 2021 data for this particular set or will I have to change more in the script itself?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks in advance!&lt;/P&gt;</description>
      <pubDate>Fri, 07 Jan 2022 18:53:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Transitioning-year-and-pulling-previous-YTD-data/m-p/1878612#M1216770</guid>
      <dc:creator>zcatoe</dc:creator>
      <dc:date>2022-01-07T18:53:37Z</dc:date>
    </item>
    <item>
      <title>Re: Transitioning year and pulling previous YTD data</title>
      <link>https://community.qlik.com/t5/QlikView/Transitioning-year-and-pulling-previous-YTD-data/m-p/1878635#M1216771</link>
      <description>&lt;P&gt;Your formula is still valid for Current YTD, for Previous YTD (PYTD) you need to create a new one:&lt;/P&gt;
&lt;P&gt;1.&amp;nbsp; Assuming that the values for Restated POS Year are all years, you will need to decrease in 1 the max year:&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;$(=Max([Restated POS Year])-1)&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;2. Optionally In script, create a new Flag IsInPTYD (is in Previous Year To Date) with value 1 for 2021 and 0 for current year and the rest of the years, or just remove that part from Set Analysis formula.&lt;/P&gt;
&lt;P&gt;Final version of formula with suggested changes:&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Sum( {$&amp;lt;IsInPYTD={1},[Restated POS Year] = {$(=Max([Restated POS Year])-1)}&amp;gt;} [Retail Sales Dollars])&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Regards.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 07 Jan 2022 20:17:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Transitioning-year-and-pulling-previous-YTD-data/m-p/1878635#M1216771</guid>
      <dc:creator>_Gerardo_</dc:creator>
      <dc:date>2022-01-07T20:17:54Z</dc:date>
    </item>
  </channel>
</rss>

