<?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 Current plus previous 13 weeks in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Current-plus-previous-13-weeks/m-p/616155#M227173</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;So, I'm trying to create a chart that shows the current week plus previous 13 weeks. The dashboard contains more years than just the current year, but thats cool, I want to show data that is in those weeks for previous years. I'm trying to use set analysis, but its not working quite right. Anyone know whats wrong with the below? Its showing 15 weeks for some reason.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sum({&amp;lt;Week ={"&amp;gt;$(=num(Week(Today())-13))"}, Week ={"&amp;lt;=$(=num(Week(Today())))"}&amp;gt;} [$ VA])&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 24 Apr 2014 14:27:37 GMT</pubDate>
    <dc:creator>richnorris</dc:creator>
    <dc:date>2014-04-24T14:27:37Z</dc:date>
    <item>
      <title>Current plus previous 13 weeks</title>
      <link>https://community.qlik.com/t5/QlikView/Current-plus-previous-13-weeks/m-p/616155#M227173</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;So, I'm trying to create a chart that shows the current week plus previous 13 weeks. The dashboard contains more years than just the current year, but thats cool, I want to show data that is in those weeks for previous years. I'm trying to use set analysis, but its not working quite right. Anyone know whats wrong with the below? Its showing 15 weeks for some reason.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sum({&amp;lt;Week ={"&amp;gt;$(=num(Week(Today())-13))"}, Week ={"&amp;lt;=$(=num(Week(Today())))"}&amp;gt;} [$ VA])&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Apr 2014 14:27:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Current-plus-previous-13-weeks/m-p/616155#M227173</guid>
      <dc:creator>richnorris</dc:creator>
      <dc:date>2014-04-24T14:27:37Z</dc:date>
    </item>
    <item>
      <title>Re: Current plus previous 13 weeks</title>
      <link>https://community.qlik.com/t5/QlikView/Current-plus-previous-13-weeks/m-p/616156#M227174</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What about some thing like&lt;/P&gt;&lt;P&gt;&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;"&gt;='W'&amp;amp;Sum({&amp;lt;Week ={"&amp;gt;$(=num(Week(Today())-13))"} &amp;gt;} [$ VA])&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Apr 2014 14:33:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Current-plus-previous-13-weeks/m-p/616156#M227174</guid>
      <dc:creator>its_anandrjs</dc:creator>
      <dc:date>2014-04-24T14:33:52Z</dc:date>
    </item>
    <item>
      <title>Re: Current plus previous 13 weeks</title>
      <link>https://community.qlik.com/t5/QlikView/Current-plus-previous-13-weeks/m-p/616157#M227175</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I would use a nother expression, week gives only the week in the year. Use st like Datefiled &amp;gt;= floor(weekstart(today-13*7))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Apr 2014 14:40:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Current-plus-previous-13-weeks/m-p/616157#M227175</guid>
      <dc:creator>jonasheisterkam</dc:creator>
      <dc:date>2014-04-24T14:40:58Z</dc:date>
    </item>
    <item>
      <title>Re: Current plus previous 13 weeks</title>
      <link>https://community.qlik.com/t5/QlikView/Current-plus-previous-13-weeks/m-p/616158#M227176</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What do you mean when you say it gives 'only the week in the year' ? If I select week 3, but don't select a year, it will select the third week of all four years that I have in the dashboard. This is what I want. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That said, I think you're onto something with just using days * 7, I think thats probably cray cray enough to work. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Apr 2014 14:46:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Current-plus-previous-13-weeks/m-p/616158#M227176</guid>
      <dc:creator>richnorris</dc:creator>
      <dc:date>2014-04-24T14:46:02Z</dc:date>
    </item>
    <item>
      <title>Re: Current plus previous 13 weeks</title>
      <link>https://community.qlik.com/t5/QlikView/Current-plus-previous-13-weeks/m-p/616159#M227177</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry, was just being a nump-tron, it was applying the two set analysis' sequentially, with the second overwriting the first, so it was actually just doing Week &amp;lt;= Current, hence the extra weeks. what I actually needed was just to combine them into one big ol' statement like thus:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sum({&amp;lt;Week ={"&amp;gt;$(=num(Week(Today())-13))&amp;lt;=$(=num(Week(Today())))"}&amp;gt;} [$ VA])&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers for all your help though chaps, Jonas I reckon in the future I'll just do what you said, rather than messing around with the various different date-types. Seriously, why is there an AddMonths() but no AddDays / AddWeeks etc? So many caveats like that to deal with, better off just breaking everything down into days and then doing it the manly / manual way.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Apr 2014 14:52:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Current-plus-previous-13-weeks/m-p/616159#M227177</guid>
      <dc:creator>richnorris</dc:creator>
      <dc:date>2014-04-24T14:52:44Z</dc:date>
    </item>
    <item>
      <title>Re: Current plus previous 13 weeks</title>
      <link>https://community.qlik.com/t5/QlikView/Current-plus-previous-13-weeks/m-p/616160#M227178</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You may add a field WeekID in your calendar which has week number as sequence numbers.&lt;/P&gt;&lt;P&gt;Choose your dimensions as&lt;/P&gt;&lt;P&gt;If(WeekID &amp;gt;= (current WeekID -13), WeekID,Null())&lt;/P&gt;&lt;P&gt;You can store current WeekID in a variable or calculate using Max(WeekID)&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Apr 2014 14:54:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Current-plus-previous-13-weeks/m-p/616160#M227178</guid>
      <dc:creator>nagaiank</dc:creator>
      <dc:date>2014-04-24T14:54:41Z</dc:date>
    </item>
  </channel>
</rss>

