<?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 13 Months data- Multiple Date columns in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Rolling-13-Months-data-Multiple-Date-columns/m-p/1375060#M419823</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you also need to have 2 master calendars (one for each fact table) or do a link table to accommodate a single calendar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 09 Aug 2017 20:45:48 GMT</pubDate>
    <dc:creator>dan_sullivan</dc:creator>
    <dc:date>2017-08-09T20:45:48Z</dc:date>
    <item>
      <title>Rolling 13 Months data- Multiple Date columns</title>
      <link>https://community.qlik.com/t5/QlikView/Rolling-13-Months-data-Multiple-Date-columns/m-p/1375058#M419821</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 have a Master Calendar with below columns&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Calendar Date&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Year&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Month&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Period (Year &amp;amp; Month) as Year_Month&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;And 1 fact table which has &lt;/P&gt;&lt;P&gt;Product Start Date&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Product_Start_Year_Month &lt;SPAN style="font-size: 13.3333px;"&gt;as Year_Month&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Product_ID_Start &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Another fact table which has &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Product End Date.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Product_End_Year_Month &lt;SPAN style="font-size: 13.3333px;"&gt;as Year_Month&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Product_ID_End&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;I need to calculate &lt;/P&gt;&lt;P&gt;[count (Product) as per &lt;SPAN style="font-size: 13.3333px;"&gt;Product Start Date (Calendar current month)- &lt;SPAN style="font-size: 13.3333px;"&gt;count (Product) as per &lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Product End Date (Calendar Previous Month) ] for&lt;/SPAN&gt;&lt;/SPAN&gt; 13 &lt;SPAN style="font-size: 13.3333px;"&gt;rolling &lt;/SPAN&gt;months of Master Calendar. Can anybody help?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Aug 2017 20:31:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rolling-13-Months-data-Multiple-Date-columns/m-p/1375058#M419821</guid>
      <dc:creator>ankitg4688</dc:creator>
      <dc:date>2017-08-09T20:31:46Z</dc:date>
    </item>
    <item>
      <title>Re: Rolling 13 Months data- Multiple Date columns</title>
      <link>https://community.qlik.com/t5/QlikView/Rolling-13-Months-data-Multiple-Date-columns/m-p/1375059#M419822</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;create a flag in your master calendar then use set analysis in your count&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ADD THIS TO YOUR CALENDAR SCRIPT:&lt;/P&gt;&lt;P&gt;IF(CalendarDate &amp;gt;= AddMonths(MonthStart(Today()),-12) AND CalendarDate &amp;lt;= Today(),1,0) AS [Rolling 13MO Flag]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CREATE SET ANALYSIS MEASURE&lt;/P&gt;&lt;P&gt;COUNT({$&amp;lt;[Rolling 13MO Flag]={'1'}&amp;gt;}product)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Aug 2017 20:44:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rolling-13-Months-data-Multiple-Date-columns/m-p/1375059#M419822</guid>
      <dc:creator>dan_sullivan</dc:creator>
      <dc:date>2017-08-09T20:44:20Z</dc:date>
    </item>
    <item>
      <title>Re: Rolling 13 Months data- Multiple Date columns</title>
      <link>https://community.qlik.com/t5/QlikView/Rolling-13-Months-data-Multiple-Date-columns/m-p/1375060#M419823</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you also need to have 2 master calendars (one for each fact table) or do a link table to accommodate a single calendar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Aug 2017 20:45:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rolling-13-Months-data-Multiple-Date-columns/m-p/1375060#M419823</guid>
      <dc:creator>dan_sullivan</dc:creator>
      <dc:date>2017-08-09T20:45:48Z</dc:date>
    </item>
    <item>
      <title>Re: Rolling 13 Months data- Multiple Date columns</title>
      <link>https://community.qlik.com/t5/QlikView/Rolling-13-Months-data-Multiple-Date-columns/m-p/1375061#M419824</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for your reply Dan. I will elaborate on this issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am taking 5 years of data and there will be Year, &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13.3333px;"&gt;Year_Month, Quarter and Month &lt;SPAN style="font-size: 13.3333px;"&gt;filters &lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;for user selection&lt;/SPAN&gt;&lt;/SPAN&gt;. My expression for rolling 13 months is&lt;/P&gt;&lt;P&gt;count({ &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13.3333px;"&gt;Product_Start_Year_Month = { "&amp;gt;=date(addmonths(Date(date#(max(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13.3333px;"&gt;Product_Start_Year_Month),'YYYYMM'),&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13.3333px;"&gt;'YYYYMM')&lt;/SPAN&gt;12),&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13.3333px;"&gt;'YYYYMM')) &amp;lt;= $(=date(addmonths(date#(max(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13.3333px;"&gt;Product_Start_Year_Month&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;}&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13.3333px;"&gt;,'YYYYMM'),&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13.3333px;"&gt;'YYYYMM')&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13.3333px;"&gt;12),&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13.3333px;"&gt;'YYYYMM'))" } &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13.3333px;"&gt;Product_ID_Start )&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;STRONG&gt;which gives me correct rolling data in line chart if user selection filter is&amp;nbsp; "&lt;/STRONG&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13.3333px;"&gt;&lt;STRONG&gt;Product_Start_Year_Month" (belong to same table). &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;But, when I use &lt;SPAN style="font-size: 13.3333px;"&gt;Year or &lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13.3333px;"&gt;Year_Month (from master calendar) it doesn't role (provided there is association)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Same, is the case with &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13.3333px;"&gt;Product_End_Year_Month.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13.3333px; 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: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13.3333px;"&gt;I tried your suggestion of link table but still it didn't work. Can you suggest on this?&lt;/SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Aug 2017 17:25:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rolling-13-Months-data-Multiple-Date-columns/m-p/1375061#M419824</guid>
      <dc:creator>ankitg4688</dc:creator>
      <dc:date>2017-08-10T17:25:14Z</dc:date>
    </item>
  </channel>
</rss>

