<?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 months in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/rolling-12-months/m-p/471873#M1154523</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Melanie,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;your expression is ok. The problem is that "DateRaised" looks like a date field but is a timestamp which means a date including the time. So it will behave like a timestamp and for ex. you will have trouble in sorting it as a date. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, if you are able to load your data for yourself, transform the incoming source values from timestamp to date before storing it in QV. Function see my post above. Otherwise ask the responsible poeple to do this for you.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;RR&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 29 Mar 2013 21:01:25 GMT</pubDate>
    <dc:creator />
    <dc:date>2013-03-29T21:01:25Z</dc:date>
    <item>
      <title>rolling 12 months</title>
      <link>https://community.qlik.com/t5/QlikView/rolling-12-months/m-p/471867#M1154517</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_13640556488306108" jivemacro_uid="_13640556488306108"&gt;&lt;P&gt;&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could someone please give me a beginners guide to creating an expression that will give me a rolling 12 months (or last 12 months) from the current month.&lt;/P&gt;&lt;P&gt;I've searched on the forum and found this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;count&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;({1&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;DateRaised&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;={&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;"&amp;gt;=$(=addmonths(monthend(max(DateRaised))+1,-12)) &amp;lt;=$(=max(DateRaised))"&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;}&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;StatusFlagID&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but which works as far as selecting the current month and showing the months previous, but it doesn't stop at 12, instead I get results back from day dot!&lt;/P&gt;&lt;P&gt;Has it got something to do with the monthend?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help greatly appreciated&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 23 Mar 2013 13:18:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/rolling-12-months/m-p/471867#M1154517</guid>
      <dc:creator />
      <dc:date>2013-03-23T13:18:47Z</dc:date>
    </item>
    <item>
      <title>Re: rolling 12 months</title>
      <link>https://community.qlik.com/t5/QlikView/rolling-12-months/m-p/471868#M1154518</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You question is hard to answer without being able to look at the document you're working on. I've attached an example that shows a rolling 12 sum and I've tried to explain how it works.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One thing that should be mentioned is that with set analysis expressions you can only show the rolling12 for one selected month (actually the max month of the selection). If you want to use a month as dimension and show the rolling12 for every month then you need another solution, what some of us call an AsOf table.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 23 Mar 2013 14:12:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/rolling-12-months/m-p/471868#M1154518</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2013-03-23T14:12:47Z</dc:date>
    </item>
    <item>
      <title>Re: rolling 12 months</title>
      <link>https://community.qlik.com/t5/QlikView/rolling-12-months/m-p/471869#M1154519</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks, that seems all a bit too advanced for my level &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/wink.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyway, I've added a file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Basically when I select a month like March 2013 I want the chart to show just the last 12 months, not everything like it current is.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 23 Mar 2013 16:27:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/rolling-12-months/m-p/471869#M1154519</guid>
      <dc:creator />
      <dc:date>2013-03-23T16:27:02Z</dc:date>
    </item>
    <item>
      <title>Re: rolling 12 months</title>
      <link>https://community.qlik.com/t5/QlikView/rolling-12-months/m-p/471870#M1154520</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Melanie,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;your expression is working quite well.&lt;/P&gt;&lt;P&gt;BUT the field "DateRaised" is a timestamp. So you need to build a timestamp to compare with it. As a quick workaround I added " 00:00:00" to your expression (Take care of the leading blank). Since then it works like you expect it. &lt;/P&gt;&lt;P&gt;May be better: use the DateRaised as a real Date-Field, this means to convert it from timestamp to date during the load. (similar to this: Date(Floor(Input)) AS DateRaised, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;count({1&amp;lt;DateRaised={"&amp;gt;=$(=addmonths(monthend(max(DateRaised))+1,-12)) 00:00:00 &amp;lt;=$(=max(DateRaised))"},StatusFlagID={'*1*'}, IncidentType={'*Accident*'}, ListTitle={'*Employee*'}&amp;gt;}StatusFlagID)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HtH&lt;/P&gt;&lt;P&gt;Roland&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 23 Mar 2013 16:59:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/rolling-12-months/m-p/471870#M1154520</guid>
      <dc:creator />
      <dc:date>2013-03-23T16:59:35Z</dc:date>
    </item>
    <item>
      <title>Re: rolling 12 months</title>
      <link>https://community.qlik.com/t5/QlikView/rolling-12-months/m-p/471871#M1154521</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thats great thanks&lt;/P&gt;&lt;P&gt;Is my whole expression a bit of a work around?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm happy that is works for now, but I would like to do this properly at some point.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 23 Mar 2013 17:09:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/rolling-12-months/m-p/471871#M1154521</guid>
      <dc:creator />
      <dc:date>2013-03-23T17:09:13Z</dc:date>
    </item>
    <item>
      <title>Re: rolling 12 months</title>
      <link>https://community.qlik.com/t5/QlikView/rolling-12-months/m-p/471872#M1154522</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Roland&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Are you able to expand on this &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;May be better: use the DateRaised as a real Date-Field, this means to convert it from timestamp to date during the load. (similar to this: Date(Floor(Input)) AS DateRaised&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;as I'm unable to get my chart to sort by the date.&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, 27 Mar 2013 18:41:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/rolling-12-months/m-p/471872#M1154522</guid>
      <dc:creator />
      <dc:date>2013-03-27T18:41:34Z</dc:date>
    </item>
    <item>
      <title>Re: rolling 12 months</title>
      <link>https://community.qlik.com/t5/QlikView/rolling-12-months/m-p/471873#M1154523</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Melanie,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;your expression is ok. The problem is that "DateRaised" looks like a date field but is a timestamp which means a date including the time. So it will behave like a timestamp and for ex. you will have trouble in sorting it as a date. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, if you are able to load your data for yourself, transform the incoming source values from timestamp to date before storing it in QV. Function see my post above. Otherwise ask the responsible poeple to do this for you.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;RR&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Mar 2013 21:01:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/rolling-12-months/m-p/471873#M1154523</guid>
      <dc:creator />
      <dc:date>2013-03-29T21:01:25Z</dc:date>
    </item>
  </channel>
</rss>

