<?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 Rolling months per year selected in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Rolling-months-per-year-selected/m-p/228762#M80766</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Probably something like this?&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;Dimension = AsOfMonth&lt;BR /&gt;Expression 1 = sum({&amp;lt;MonthsBack={'0'}&amp;gt;} Sales)&lt;BR /&gt;Expression 2 = sum(Sales)&lt;BR /&gt;Expression 3 = sum({&amp;lt;MonthsBack={"&amp;gt;=0 &amp;lt;12"}&amp;gt;} Sales)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 21 Dec 2010 02:39:29 GMT</pubDate>
    <dc:creator>johnw</dc:creator>
    <dc:date>2010-12-21T02:39:29Z</dc:date>
    <item>
      <title>Rolling months per year selected</title>
      <link>https://community.qlik.com/t5/QlikView/Rolling-months-per-year-selected/m-p/228753#M80757</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey guys, I've been thought the forum the whole looking for this answer, and I also have tried some kind of examples. Specially the posts of John Whiterspoon and Oleg Troianski.&lt;/P&gt;&lt;P&gt;I finally based my script in the file posted in this post :&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/forums/t/34450.aspx" title="John Whiterspoon Example"&gt;http://community.qlik.com/forums/t/34450.aspx&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is what I really want to do :&lt;/P&gt;&lt;P&gt;-I want to calculate a &lt;I&gt;finantial ratio&lt;/I&gt;, and I need a &lt;I&gt;straight table&lt;/I&gt; that needs the following :&lt;/P&gt;&lt;P&gt;Dimension : Months&lt;/P&gt;&lt;P&gt;Expression : Sales of the last 12 months per each month.&lt;/P&gt;&lt;P&gt;For example :&lt;/P&gt;&lt;P&gt;If I select year 2009, the sales for january would be from feb 2008 to jan 2009, and so on for february, march,...,december.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm trying to achieve it with the following script :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-weight: bold"&gt;Data:&lt;BR /&gt;LOAD *&lt;BR /&gt;,month(MonthYear) as Month&lt;BR /&gt;,year(MonthYear) as Year&lt;BR /&gt;;&lt;BR /&gt;LOAD&lt;BR /&gt; date(addmonths(makedate(2006,12),recno()),'MMM YYYY') as MonthYear&lt;BR /&gt;,ceil(rand()*100) as Sales&lt;BR /&gt;AUTOGENERATE 48&lt;BR /&gt;;&lt;BR /&gt;&lt;BR /&gt;AsOf:&lt;BR /&gt;LOAD *,&lt;BR /&gt; left(MonthYear,3) as MonthDisplay;&lt;BR /&gt;LOAD&lt;BR /&gt; MonthYear as AsOfMonth&lt;BR /&gt;,date(addmonths(MonthYear,1-iterno()),'MMM YYYY') as MonthYear&lt;BR /&gt;,iterno()-1 as MonthsBack&lt;BR /&gt;RESIDENT Data&lt;BR /&gt;WHILE iterno()&amp;lt;=12&lt;BR /&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is my result in tables, if I select Feb 2010.&lt;/P&gt;&lt;P&gt;&lt;IMG alt="error loading image" class="jive-image error-loading-image" src="https://community.qlik.com/legacyfs/online/-3107_sourceID:3107" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, following the philosophy "AsOf" Table I got the desired result, but only if I select an "AsOfYear" previously.&lt;/P&gt;&lt;P&gt;Is there any way to do it dynamically in the straight table once I select one year?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help would be appreciated.&lt;/P&gt;&lt;P&gt;Cheers!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Dec 2010 19:46:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rolling-months-per-year-selected/m-p/228753#M80757</guid>
      <dc:creator>marcel_olmo</dc:creator>
      <dc:date>2010-12-20T19:46:55Z</dc:date>
    </item>
    <item>
      <title>Rolling months per year selected</title>
      <link>https://community.qlik.com/t5/QlikView/Rolling-months-per-year-selected/m-p/228754#M80758</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How about creating an action to select the corresponding AsOfYear if you select a Year or Month and ignoring the Year and Month selected with set analysis when calculating your rolling months?&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Dec 2010 20:50:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rolling-months-per-year-selected/m-p/228754#M80758</guid>
      <dc:creator>pover</dc:creator>
      <dc:date>2010-12-20T20:50:00Z</dc:date>
    </item>
    <item>
      <title>Rolling months per year selected</title>
      <link>https://community.qlik.com/t5/QlikView/Rolling-months-per-year-selected/m-p/228755#M80759</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Your script doesn't produce an AsOfYear. Simply adding year(MonthYear) as AsOfYear lets you select an AsOfYear and get the right connections to MonthYear. Or you can select only an AsOfMonth and get the right connections without selecting an AsOfYear.&lt;/P&gt;&lt;P&gt;Basically, the point is that the users should be selecting AsOfYear, AsOfMonth and so on, NOT Year, Month and so on. If you let them select the actual year, then the data is limited to that year and you won't get your rolling 12 months. You could change the field names if you don't want them displayed like that. Like using "Month" instead of "AsOfMonth" and "RawMonth" instead of "MonthYear".&lt;/P&gt;&lt;P&gt;But I'm really not clear what problem you're having, and what you want solved.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Dec 2010 23:50:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rolling-months-per-year-selected/m-p/228755#M80759</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2010-12-20T23:50:38Z</dc:date>
    </item>
    <item>
      <title>Rolling months per year selected</title>
      <link>https://community.qlik.com/t5/QlikView/Rolling-months-per-year-selected/m-p/228756#M80760</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I've just fix it. I've changed what was missing. Now it worked nice.&lt;/P&gt;&lt;P&gt;All I need to do is to separate the calculations between sheets, because something I'm gonna need "Year" and other times "AsOfYear".&lt;/P&gt;&lt;P&gt;Thanks a lot John for your useful help&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Dec 2010 23:59:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rolling-months-per-year-selected/m-p/228756#M80760</guid>
      <dc:creator>marcel_olmo</dc:creator>
      <dc:date>2010-12-20T23:59:20Z</dc:date>
    </item>
    <item>
      <title>Rolling months per year selected</title>
      <link>https://community.qlik.com/t5/QlikView/Rolling-months-per-year-selected/m-p/228757#M80761</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="jive_text_macro jive_macro_quote" jivemacro="quote"&gt;&lt;BR /&gt;Marcel Olmo wrote:All I need to do is to separate the calculations between sheets, because something I'm gonna need "Year" and other times "AsOfYear".&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;One alternative is to add an AccumulationType field to your AsOf table and concatenate some additional rows to let you specify when you mean "just this month" instead of "rolling 12 months".&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;AsOfMonth, AccumulationType, Month&lt;BR /&gt;Dec 2010, Current, Dec 2010&lt;BR /&gt;Dec 2010, 12 Month, Dec 2010&lt;BR /&gt;Dec 2020, 12 Month, Nov 2010&lt;BR /&gt;...&lt;BR /&gt;Dec 2010, 12 Month, Jan 2010&lt;BR /&gt;Nov 2010, Current, Nov 2010&lt;BR /&gt;Nov 2010, 12 Month, Nov 2010&lt;BR /&gt;Nov 2010, 12 Month, Oct 2010&lt;BR /&gt;...&lt;BR /&gt;Nov 2010, 12 Month, Dec 2009&lt;BR /&gt;etc.&lt;/P&gt;&lt;P&gt;Now your charts will typically need to use set analysis to lock in to a particular accumulation type. For instance:&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;sum({&amp;lt;AccumulationType={'Current'}&amp;gt;} Sales) // to get the sales for ONLY that month&lt;/P&gt;&lt;P&gt;But if you go to that trouble, you can now use the AsOfMonth everywhere, not just where you need a 12 month accumulation.&lt;/P&gt;&lt;P&gt;It might be easier to just use AsOfMonth on one tab and Month on another tab, and clear or set one from the other as you change tabs, but that seems a little complicated as well, and might make it difficult to mix the two on a single page, or in a single chart.&lt;/P&gt;&lt;P&gt;Not sure which would be easier or better overall. Just thought I'd present an option.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Dec 2010 00:13:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rolling-months-per-year-selected/m-p/228757#M80761</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2010-12-21T00:13:58Z</dc:date>
    </item>
    <item>
      <title>Rolling months per year selected</title>
      <link>https://community.qlik.com/t5/QlikView/Rolling-months-per-year-selected/m-p/228758#M80762</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks again John for your recommendation. I'm gonna try it as well.&lt;/P&gt;&lt;P&gt;Cheers!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Dec 2010 00:40:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rolling-months-per-year-selected/m-p/228758#M80762</guid>
      <dc:creator>marcel_olmo</dc:creator>
      <dc:date>2010-12-21T00:40:52Z</dc:date>
    </item>
    <item>
      <title>Rolling months per year selected</title>
      <link>https://community.qlik.com/t5/QlikView/Rolling-months-per-year-selected/m-p/228759#M80763</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What it could be maybe more interesting is to mix the sum(sales), the accumulative sum(sales) and the rolling of the last 12 month of the sales in the same table.&lt;/P&gt;&lt;P&gt;Actually it was my original idea , and is what I'm trying to mix. It's set analysis hard stuff, but I think it worth it.&lt;/P&gt;&lt;P&gt;Thanks anyway John!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Dec 2010 01:39:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rolling-months-per-year-selected/m-p/228759#M80763</guid>
      <dc:creator>marcel_olmo</dc:creator>
      <dc:date>2010-12-21T01:39:03Z</dc:date>
    </item>
    <item>
      <title>Rolling months per year selected</title>
      <link>https://community.qlik.com/t5/QlikView/Rolling-months-per-year-selected/m-p/228760#M80764</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Mixing them is simple once the data model is in place. Identify each of those with an AccumulationType. In this case, maybe 'Current','Accumulated','Rolling 12 Months'. Now make a pivot table:&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;Dimension 1 = AsOfMonth&lt;BR /&gt;Dimension 2 = AccumulationType // move to the top&lt;BR /&gt;Expression = sum(Sales)&lt;/P&gt;&lt;P&gt;If you need a straight table, and need each accumulation type as a separate column instead of a separate row, it's a little more complicated, but not all that bad:&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;Dimension = AsOfMonth&lt;BR /&gt;Expression 1 = sum({&amp;lt;AccumulationType={'Current'}&amp;gt;} Sales)&lt;BR /&gt;Expression 2 = sum({&amp;lt;AccumulationType={'Accumulated'}&amp;gt;} Sales)&lt;BR /&gt;Expression 3 = sum({&amp;lt;AccumulationType={'Rolling 12 Months'}&amp;gt;} Sales)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Dec 2010 02:03:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rolling-months-per-year-selected/m-p/228760#M80764</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2010-12-21T02:03:41Z</dc:date>
    </item>
    <item>
      <title>Rolling months per year selected</title>
      <link>https://community.qlik.com/t5/QlikView/Rolling-months-per-year-selected/m-p/228761#M80765</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks John Again.&lt;/P&gt;&lt;P&gt;I was struggling about how can I distinguish between them once I get the "AsOF" Table.&lt;/P&gt;&lt;P&gt;As far as I'm concern, the accumulationtype "current" would be when the "monthsback" variable is 0, to count only them.&lt;/P&gt;&lt;P&gt;But I don't get how can I get the others.&lt;/P&gt;&lt;P&gt;My "AsOf" table looks like that :&lt;/P&gt;&lt;P&gt;&lt;A href="http://community.qlik.com/cfs-file.ashx/__key/CommunityServer.Discussions.Components.Files/11/4265.dibb.bmp"&gt;&lt;IMG alt="" border="0" src="http://community.qlik.com/resized-image.ashx/__size/550x0/__key/CommunityServer.Discussions.Components.Files/11/4265.dibb.bmp" /&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Dec 2010 02:31:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rolling-months-per-year-selected/m-p/228761#M80765</guid>
      <dc:creator>marcel_olmo</dc:creator>
      <dc:date>2010-12-21T02:31:53Z</dc:date>
    </item>
    <item>
      <title>Rolling months per year selected</title>
      <link>https://community.qlik.com/t5/QlikView/Rolling-months-per-year-selected/m-p/228762#M80766</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Probably something like this?&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;Dimension = AsOfMonth&lt;BR /&gt;Expression 1 = sum({&amp;lt;MonthsBack={'0'}&amp;gt;} Sales)&lt;BR /&gt;Expression 2 = sum(Sales)&lt;BR /&gt;Expression 3 = sum({&amp;lt;MonthsBack={"&amp;gt;=0 &amp;lt;12"}&amp;gt;} Sales)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Dec 2010 02:39:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rolling-months-per-year-selected/m-p/228762#M80766</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2010-12-21T02:39:29Z</dc:date>
    </item>
    <item>
      <title>Rolling months per year selected</title>
      <link>https://community.qlik.com/t5/QlikView/Rolling-months-per-year-selected/m-p/228763#M80767</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks John again!!&lt;/P&gt;&lt;P&gt;Finally I got my 100 % desired result.&lt;/P&gt;&lt;P&gt;Thanks a lot for your useful help.&lt;/P&gt;&lt;P&gt;Now I think I've done with this post. &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;&lt;P&gt;See you around!!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Dec 2010 02:52:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rolling-months-per-year-selected/m-p/228763#M80767</guid>
      <dc:creator>marcel_olmo</dc:creator>
      <dc:date>2010-12-21T02:52:29Z</dc:date>
    </item>
    <item>
      <title>Rolling months per year selected</title>
      <link>https://community.qlik.com/t5/QlikView/Rolling-months-per-year-selected/m-p/228764#M80768</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;have a look at this solution: &lt;A href="http://community.qlik.com/forums/t/38353.aspx"&gt;http://community.qlik.com/forums/t/38353.aspx&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;tresesco&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Dec 2010 05:58:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rolling-months-per-year-selected/m-p/228764#M80768</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2010-12-21T05:58:41Z</dc:date>
    </item>
    <item>
      <title>Rolling months per year selected</title>
      <link>https://community.qlik.com/t5/QlikView/Rolling-months-per-year-selected/m-p/228765#M80769</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Finally, I've attached a demo of my desired result.&lt;/P&gt;&lt;P&gt;I think it could be helpful for other qlikview members.&lt;/P&gt;&lt;P&gt;Cheers!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Dec 2010 12:16:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rolling-months-per-year-selected/m-p/228765#M80769</guid>
      <dc:creator>marcel_olmo</dc:creator>
      <dc:date>2010-12-21T12:16:14Z</dc:date>
    </item>
  </channel>
</rss>

