<?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: Last Quarter same day and Last year same day in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Last-Quarter-same-day-and-Last-year-same-day/m-p/86099#M756769</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Maybe create flags for previous year and previous quarter in back end first&lt;/P&gt;&lt;P&gt;if(InYear(TempDate, today(),-1), 1, 0) as LastYearFlag,&lt;/P&gt;&lt;P&gt;if(InQuarter(TempDate, today(),-1), 1, 0) as LastQtrFlag,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and in front end use&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Previous Quarter:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;sum({&amp;lt; Week = {"&amp;gt;=$(=Max(Week(Date)))"}, LastQtrFlag ={1} &amp;gt;} YOURMEASUREHERE )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Previous Year:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;sum({&amp;lt; Week = {"&amp;gt;=$(=Max(Week(Date)))"}, LastYearFlag={1} &amp;gt;} YOURMEASUREHERE )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Not sure if this would work but you need to have Week, Date, Year, Month and Quarter field (derive it in Master Calendar script or if using only fact table define in fact)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 20 Sep 2018 17:57:26 GMT</pubDate>
    <dc:creator>MK9885</dc:creator>
    <dc:date>2018-09-20T17:57:26Z</dc:date>
    <item>
      <title>Last Quarter same day and Last year same day</title>
      <link>https://community.qlik.com/t5/QlikView/Last-Quarter-same-day-and-Last-year-same-day/m-p/86097#M756767</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;I need to calculate sales for current quarter vs last quarter . Problem is it has to be calculated for the same day as today for last quarter.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example :&amp;nbsp; if today is 9-19-2018 Q3 then it should show sum of sales for&amp;nbsp; 6-19-2018&amp;nbsp; Q2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Similarly i need to do that for Last Year .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any idea how this can be done ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Last-Quarter-same-day-and-Last-year-same-day/m-p/86097#M756767</guid>
      <dc:creator>pankaj999</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Last Quarter same day and Last year same day</title>
      <link>https://community.qlik.com/t5/QlikView/Last-Quarter-same-day-and-Last-year-same-day/m-p/86098#M756768</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not knowing your data model its difficult give an accurate solution. hopefully below can nudge you in right direction&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;depending on your data model create measures&lt;/P&gt;&lt;P&gt;Sum({&amp;lt;Date="$(=today())"&amp;gt;}&lt;/P&gt;&lt;P&gt;Sum({&amp;lt;Date="$(=AddMonths(today(),-3))"&amp;gt;}&lt;/P&gt;&lt;P&gt;Sum({&amp;lt;Date="$(=AddYear(today(),-1))"&amp;gt;}&lt;/P&gt;&lt;P&gt;Sum({&amp;lt;Date="$(=AddYear(AddMonths(today(),-3),-1))"&amp;gt;}&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Sep 2018 17:48:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Last-Quarter-same-day-and-Last-year-same-day/m-p/86098#M756768</guid>
      <dc:creator>dplr-rn</dc:creator>
      <dc:date>2018-09-20T17:48:36Z</dc:date>
    </item>
    <item>
      <title>Re: Last Quarter same day and Last year same day</title>
      <link>https://community.qlik.com/t5/QlikView/Last-Quarter-same-day-and-Last-year-same-day/m-p/86099#M756769</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Maybe create flags for previous year and previous quarter in back end first&lt;/P&gt;&lt;P&gt;if(InYear(TempDate, today(),-1), 1, 0) as LastYearFlag,&lt;/P&gt;&lt;P&gt;if(InQuarter(TempDate, today(),-1), 1, 0) as LastQtrFlag,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and in front end use&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Previous Quarter:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;sum({&amp;lt; Week = {"&amp;gt;=$(=Max(Week(Date)))"}, LastQtrFlag ={1} &amp;gt;} YOURMEASUREHERE )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Previous Year:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;sum({&amp;lt; Week = {"&amp;gt;=$(=Max(Week(Date)))"}, LastYearFlag={1} &amp;gt;} YOURMEASUREHERE )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Not sure if this would work but you need to have Week, Date, Year, Month and Quarter field (derive it in Master Calendar script or if using only fact table define in fact)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Sep 2018 17:57:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Last-Quarter-same-day-and-Last-year-same-day/m-p/86099#M756769</guid>
      <dc:creator>MK9885</dc:creator>
      <dc:date>2018-09-20T17:57:26Z</dc:date>
    </item>
  </channel>
</rss>

