<?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: Rolling 12 Weeks in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Rolling-12-Weeks/m-p/1012164#M343320</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for all of this. I think it's almost there, but there's one issue: A selection on MonthYear or WeekEnd doesn't have the expected result. Those are the two fields the users are actually seeing in the app. For example, if I select Jul-2015 in MonthYear in the QVW you shared, I get five bars, instead of a rolling 12 ending in July of 2015.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm looking at your set analysis, but I'm not sure yet how it should be changed. Any ideas?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Basically, I want the user to be able to select a date or range of dates in the MonthYear and WeekEnd fields, and have a rolling 12 weeks ending with whatever the maximum week is they have selected.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 03 Sep 2015 03:04:38 GMT</pubDate>
    <dc:creator>mhassinger</dc:creator>
    <dc:date>2015-09-03T03:04:38Z</dc:date>
    <item>
      <title>Rolling 12 Weeks</title>
      <link>https://community.qlik.com/t5/QlikView/Rolling-12-Weeks/m-p/1012155#M343311</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm trying to figure out the best way to show a chart that doing rolling 12 weeks. I've got the months, no problem, with:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=SUM({&amp;lt;MonthYear={'&amp;gt;=$(=Max(MonthYear)-11)&amp;lt;=$(=Max(MonthYear))'}&amp;gt;}$(vNetSales))/$(vPrecision)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The issue is I can't just subtract 11 from the WeekYear field like I can from MonthYear. My Calendar definition is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Load&amp;nbsp; &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; TempDate AS TransDate,&amp;nbsp;&amp;nbsp; &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; date(monthstart(TempDate), 'MMM-YYYY') as MonthYear,&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; week(TempDate) As Week,&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; Year(TempDate) As Year,&amp;nbsp; &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; Month(TempDate) As Month,&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; Day(TempDate) As Day,&amp;nbsp; &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; Week(weekstart(TempDate,0,7)) &amp;amp; '-' &amp;amp; WeekYear(TempDate) as WeekYear,&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; WeekEnd(TempDate,0,7) As WeekEnd&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Aug 2015 20:27:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rolling-12-Weeks/m-p/1012155#M343311</guid>
      <dc:creator>mhassinger</dc:creator>
      <dc:date>2015-08-27T20:27:09Z</dc:date>
    </item>
    <item>
      <title>Re: Rolling 12 Weeks</title>
      <link>https://community.qlik.com/t5/QlikView/Rolling-12-Weeks/m-p/1012156#M343312</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;May be create WeekYear like this in the script:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dual(Week(Weekstart(TempDate,0,7)) &amp;amp; '-' &amp;amp; WeekYear(Today()), Num(Week(Weekstart(TempDate,0,7)) &amp;amp; WeekYear(Today()))) as WeekYear&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and now even though it will look like 35-2015, it will be a number 352015 and to go back 12 Week you can subtract 110000 to get 242015&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HTH&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;Sunny&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Aug 2015 20:33:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rolling-12-Weeks/m-p/1012156#M343312</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2015-08-27T20:33:04Z</dc:date>
    </item>
    <item>
      <title>Re: Rolling 12 Weeks</title>
      <link>https://community.qlik.com/t5/QlikView/Rolling-12-Weeks/m-p/1012157#M343313</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;in addition to the above a suggestion. Whenever we are trying to work on sub part of dates, i.e. months, weeks or days always associate these values with the year or month, because these values are not unique for a given year. Hence always try to associate them with their parent value to make values unique.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Aug 2015 20:58:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rolling-12-Weeks/m-p/1012157#M343313</guid>
      <dc:creator>harsh44_bhatia</dc:creator>
      <dc:date>2015-08-27T20:58:26Z</dc:date>
    </item>
    <item>
      <title>Re: Rolling 12 Weeks</title>
      <link>https://community.qlik.com/t5/QlikView/Rolling-12-Weeks/m-p/1012158#M343314</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi Sunny&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;what if the week is 10?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Aug 2015 06:27:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rolling-12-Weeks/m-p/1012158#M343314</guid>
      <dc:creator>sasiparupudi1</dc:creator>
      <dc:date>2015-08-28T06:27:44Z</dc:date>
    </item>
    <item>
      <title>Re: Rolling 12 Weeks</title>
      <link>https://community.qlik.com/t5/QlikView/Rolling-12-Weeks/m-p/1012159#M343315</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Michael,&lt;/P&gt;&lt;P&gt;Try like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dimension: &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;WeekYear&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Expression: =Sum({&amp;lt;Year=, Month=, Week=, MonthYear=, WeekYear=, &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;TransDate={'&amp;gt;=$(=WeekStart(Max(TransDate), -11))&amp;lt;=$(=Date(Max(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;TransDate))&lt;/SPAN&gt;)'}&lt;/SPAN&gt;&amp;gt;} Sales)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jagan.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Aug 2015 07:13:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rolling-12-Weeks/m-p/1012159#M343315</guid>
      <dc:creator>jagan</dc:creator>
      <dc:date>2015-08-28T07:13:40Z</dc:date>
    </item>
    <item>
      <title>Re: Rolling 12 Weeks</title>
      <link>https://community.qlik.com/t5/QlikView/Rolling-12-Weeks/m-p/1012160#M343316</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hahahaha you guys are right &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;. The logic will have to be more complex in that case. Will need a better solution then what I proposed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;Sunny&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Aug 2015 07:15:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rolling-12-Weeks/m-p/1012160#M343316</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2015-08-28T07:15:38Z</dc:date>
    </item>
    <item>
      <title>Re: Rolling 12 Weeks</title>
      <link>https://community.qlik.com/t5/QlikView/Rolling-12-Weeks/m-p/1012161#M343317</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;May be try like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Expression: =Sum({&amp;lt;Year=, Month=, Week=, MonthYear=, WeekYear=, &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;TransDate={'&amp;gt;=$(=weekstart(MakeWeekDate( subfield(MaxString(WeekYear),'-',2) ,subfield(MaxString(WeekYear),'-',1) ),-11)))&amp;lt;=$(=weekstart(MakeWeekDate( subfield(MaxString(WeekYear),'-',2) ,subfield(MaxString(WeekYear),'-',1) ))'}&lt;/SPAN&gt;&amp;gt;} Sales)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;please check the expressions in a text box to see if it returning the correct date range&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: 13px;"&gt;=weekstart(MakeWeekDate( subfield(MaxString(WeekYear),'-',2) ,subfield(MaxString(WeekYear),'-',1) ),-11)&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: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;=weekstart(MakeWeekDate( subfield(MaxString(WeekYear),'-',2) ,subfield(MaxString(WeekYear),'-',1) )&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; 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-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;sasi&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Aug 2015 08:17:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rolling-12-Weeks/m-p/1012161#M343317</guid>
      <dc:creator>sasiparupudi1</dc:creator>
      <dc:date>2015-08-28T08:17:41Z</dc:date>
    </item>
    <item>
      <title>Re: Rolling 12 Weeks</title>
      <link>https://community.qlik.com/t5/QlikView/Rolling-12-Weeks/m-p/1012162#M343318</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Michael, did you able to achieve the answer.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 29 Aug 2015 08:24:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rolling-12-Weeks/m-p/1012162#M343318</guid>
      <dc:creator>qlikviewwizard</dc:creator>
      <dc:date>2015-08-29T08:24:09Z</dc:date>
    </item>
    <item>
      <title>Re: Rolling 12 Weeks</title>
      <link>https://community.qlik.com/t5/QlikView/Rolling-12-Weeks/m-p/1012163#M343319</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This seems like a good solution. Here is the script:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Table:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD *,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; Ceil(Rand() * 100000) as Value;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD Date(YearStart(42245-365) + RecNo()) as Date&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;AutoGenerate 730;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;QuartersMap:&amp;nbsp; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;MAPPING&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD RowNo() as Month,&amp;nbsp; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; 'Q' &amp;amp; Ceil (RowNo()/3) as Quarter&amp;nbsp; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;AUTOGENERATE (12);&amp;nbsp; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Temp:&amp;nbsp; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Load Min(Date) as minDate,&amp;nbsp; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Max(Date) as maxDate&amp;nbsp; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Resident Table;&amp;nbsp; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Let varMinDate = Num(Peek('minDate', 0, 'Temp'));&amp;nbsp; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Let varMaxDate = Num(Peek('maxDate', 0, 'Temp'));&amp;nbsp; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;DROP Table Temp;&amp;nbsp; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;TempCalendar:&amp;nbsp; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD $(varMinDate) + Iterno()-1 As Num,&amp;nbsp; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Date($(varMinDate) + IterNo() - 1) as TempDate&amp;nbsp; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; AutoGenerate 1 While $(varMinDate) + IterNo() -1 &amp;lt;= $(varMaxDate);&amp;nbsp; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;MasterCalendar:&amp;nbsp; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Load TempDate AS Date,&amp;nbsp; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Week(TempDate) As Week,&amp;nbsp; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Year(TempDate) As Year,&amp;nbsp; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Month(TempDate) As Month,&amp;nbsp; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Day(TempDate) As Day,&amp;nbsp; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; YeartoDate(TempDate)*-1 as CurYTDFlag,&amp;nbsp; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; YeartoDate(TempDate,-1)*-1 as LastYTDFlag,&amp;nbsp; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; InYear(TempDate, Monthstart($(varMaxDate)),-1) as RC12,&amp;nbsp; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Date(monthstart(TempDate), 'MMM-YYYY') as MonthYear,&amp;nbsp; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ApplyMap('QuartersMap', month(TempDate), Null()) as Quarter,&amp;nbsp; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #ff0000;"&gt;Dual(Week(WeekStart(TempDate)) &amp;amp; '-' &amp;amp; WeekYear(TempDate), AutoNumber(Week(WeekStart(TempDate)) &amp;amp; '-' &amp;amp; WeekYear(TempDate))) as WeekYear, &lt;/SPAN&gt; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; WeekDay(TempDate) as WeekDay&amp;nbsp; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Resident TempCalendar&amp;nbsp; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Order By TempDate ASC;&amp;nbsp; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Drop Table TempCalendar;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So when i add WeekYear to a chart dimension with Num(WeekYear) I get this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="97340" alt="Capture.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/97340_Capture.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To get 12 Weeks of Data I can use this in my set analysis:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN style="text-decoration: line-through;"&gt;=Sum({&amp;lt;WeekYear = {"=Num(WeekYear) &amp;gt;= Max(TOTAL WeekYear) - 11"}&amp;gt;}Value&lt;/SPAN&gt;)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;=Sum({&amp;lt;WeekYear = {"=Num(Only({&amp;lt;WeekYear = &amp;gt;}WeekYear)) &amp;gt;= Max(TOTAL WeekYear) - 11 and &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; Num(Only({&amp;lt;WeekYear = &amp;gt;}WeekYear)) &amp;lt;= Max(TOTAL WeekYear)"},&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt; Date = , Week, Year = , Month = , Day = , MonthYear = , Quarter =&amp;gt;} Value)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Output in a bar chart with no selection:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-2" src="https://community.qlik.com/legacyfs/online/97352_Capture.PNG" style="height: 205px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Output in a bar chart with Selection in WeekYear (50-2015)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-3" src="https://community.qlik.com/legacyfs/online/97353_Capture.PNG" style="height: 221px; width: 620px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 29 Aug 2015 10:06:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rolling-12-Weeks/m-p/1012163#M343319</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2015-08-29T10:06:51Z</dc:date>
    </item>
    <item>
      <title>Re: Rolling 12 Weeks</title>
      <link>https://community.qlik.com/t5/QlikView/Rolling-12-Weeks/m-p/1012164#M343320</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for all of this. I think it's almost there, but there's one issue: A selection on MonthYear or WeekEnd doesn't have the expected result. Those are the two fields the users are actually seeing in the app. For example, if I select Jul-2015 in MonthYear in the QVW you shared, I get five bars, instead of a rolling 12 ending in July of 2015.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm looking at your set analysis, but I'm not sure yet how it should be changed. Any ideas?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Basically, I want the user to be able to select a date or range of dates in the MonthYear and WeekEnd fields, and have a rolling 12 weeks ending with whatever the maximum week is they have selected.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Sep 2015 03:04:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rolling-12-Weeks/m-p/1012164#M343320</guid>
      <dc:creator>mhassinger</dc:creator>
      <dc:date>2015-09-03T03:04:38Z</dc:date>
    </item>
    <item>
      <title>Re: Rolling 12 Weeks</title>
      <link>https://community.qlik.com/t5/QlikView/Rolling-12-Weeks/m-p/1012165#M343321</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;You can try like this using the Date field&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f2f2f2;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;=Sum({&amp;lt;WeekYear =, &lt;/STRONG&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;Week=, Year = , Month = , Day = , MonthYear = , Quarter =, &lt;STRONG style="color: #3d3d3d; font-family: inherit; font-size: 12px; font-style: inherit;"&gt;Date = {'&amp;gt;=$(=WeekStart(Max(Date), -11))&amp;lt;=$(=WeekEnd(Max(Date)))'}&lt;/STRONG&gt;&amp;gt;} Value)&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f2f2f2;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f2f2f2;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;For more details you can check below link&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f2f2f2;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;&lt;A href="https://community.qlik.com/docs/DOC-9162"&gt;Set Analysis for certain Point in Time&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f2f2f2;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f2f2f2;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;Hope this helps you.&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f2f2f2;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f2f2f2;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;Regards,&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f2f2f2;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;Jagan.&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f2f2f2;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f2f2f2;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Sep 2015 03:16:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rolling-12-Weeks/m-p/1012165#M343321</guid>
      <dc:creator>jagan</dc:creator>
      <dc:date>2015-09-03T03:16:21Z</dc:date>
    </item>
    <item>
      <title>Re: Rolling 12 Weeks</title>
      <link>https://community.qlik.com/t5/QlikView/Rolling-12-Weeks/m-p/1012166#M343322</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Small change in the expression:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;=Sum({&amp;lt;WeekYear = {"=Num(Only({&amp;lt;WeekYear = , Date = , Week = , Year = , Month = , Day = , MonthYear = , Quarter =&amp;gt;}WeekYear)) &amp;gt;= Max(TOTAL WeekYear) - 11 and &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; Num(Only({&amp;lt;WeekYear = , Date = , Week = , Year = , Month = , Day = , MonthYear = , Quarter =&amp;gt;}WeekYear)) &amp;lt;= Max(TOTAL WeekYear)"},&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt; Date = , Week = , Year = , Month = , Day = , MonthYear = , Quarter =&amp;gt;} Value)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/97820_Capture.PNG" style="max-width: 620px; height: auto;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Sep 2015 03:23:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rolling-12-Weeks/m-p/1012166#M343322</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2015-09-03T03:23:32Z</dc:date>
    </item>
    <item>
      <title>Re: Rolling 12 Weeks</title>
      <link>https://community.qlik.com/t5/QlikView/Rolling-12-Weeks/m-p/1012167#M343323</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sunny,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you do this based on the Date field it will be more flexible and easier to manage the expressions, the same thing you can achieve by using below expression&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;Last 15 Weeks Sales&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Sum({&amp;lt;Year=, Quarter=, Month=, Week=, Date={‘&amp;gt;=$(=WeekStart(&lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;Max(Date)&lt;/SPAN&gt;, -14))&amp;lt;=$(=Date(&lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;Max(Date)&lt;/SPAN&gt;))’}&amp;gt;} Sales )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check this link more expressions like this&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://community.qlik.com/docs/DOC-9144" style="font-weight: bold; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3778c7;"&gt;Set Analysis for Rolling Periods&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jagan.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Sep 2015 03:38:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rolling-12-Weeks/m-p/1012167#M343323</guid>
      <dc:creator>jagan</dc:creator>
      <dc:date>2015-09-03T03:38:20Z</dc:date>
    </item>
    <item>
      <title>Re: Rolling 12 Weeks</title>
      <link>https://community.qlik.com/t5/QlikView/Rolling-12-Weeks/m-p/1012168#M343324</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey Jagan - &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I agree, dates are easier to use, but I think listing out other possibilities can prove useful for the user or others in the future &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;Sunny &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Sep 2015 07:05:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rolling-12-Weeks/m-p/1012168#M343324</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2015-09-03T07:05:34Z</dc:date>
    </item>
    <item>
      <title>Re: Rolling 12 Weeks</title>
      <link>https://community.qlik.com/t5/QlikView/Rolling-12-Weeks/m-p/1012169#M343325</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Please check Jagan's threads:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/docs/DOC-9144"&gt;Set Analysis for Rolling Periods&lt;/A&gt;‌&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/docs/DOC-9162"&gt;Set Analysis for certain Point in Time&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this will help you.&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, 03 Sep 2015 07:26:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rolling-12-Weeks/m-p/1012169#M343325</guid>
      <dc:creator>qlikviewwizard</dc:creator>
      <dc:date>2015-09-03T07:26:53Z</dc:date>
    </item>
    <item>
      <title>Re: Rolling 12 Weeks</title>
      <link>https://community.qlik.com/t5/QlikView/Rolling-12-Weeks/m-p/1012170#M343326</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sunny,&lt;/P&gt;&lt;P&gt;The expressions should be simpler and efficient that is what I am trying to say.&amp;nbsp; May be your expression works fine, but difficult one.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jagan.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Sep 2015 07:37:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rolling-12-Weeks/m-p/1012170#M343326</guid>
      <dc:creator>jagan</dc:creator>
      <dc:date>2015-09-03T07:37:45Z</dc:date>
    </item>
    <item>
      <title>Re: Rolling 12 Weeks</title>
      <link>https://community.qlik.com/t5/QlikView/Rolling-12-Weeks/m-p/1012171#M343327</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hahahaha ya that I definitely agree &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Sep 2015 07:41:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rolling-12-Weeks/m-p/1012171#M343327</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2015-09-03T07:41:11Z</dc:date>
    </item>
    <item>
      <title>Re: Rolling 12 Weeks</title>
      <link>https://community.qlik.com/t5/QlikView/Rolling-12-Weeks/m-p/1012172#M343328</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Jagan and Sunny both are correct. Smooth and straight &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Sep 2015 07:55:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rolling-12-Weeks/m-p/1012172#M343328</guid>
      <dc:creator>qlikviewwizard</dc:creator>
      <dc:date>2015-09-03T07:55:54Z</dc:date>
    </item>
    <item>
      <title>Re: Rolling 12 Weeks</title>
      <link>https://community.qlik.com/t5/QlikView/Rolling-12-Weeks/m-p/1012173#M343329</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;please see this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/docs/DOC-4252"&gt;Calculating rolling n-period totals, averages or other aggregations&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this issue is solved?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HTH&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;André Gomes&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Aug 2016 17:24:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rolling-12-Weeks/m-p/1012173#M343329</guid>
      <dc:creator>agomes1971</dc:creator>
      <dc:date>2016-08-29T17:24:53Z</dc:date>
    </item>
  </channel>
</rss>

