<?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 Set Analysis using a RANGE of weeknames in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Set-Analysis-using-a-RANGE-of-weeknames/m-p/234622#M504328</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I haven't played around with it any more right now, but I wonder why it works fine in an if statement, which I am currently using instead of the set analysis. If I need to change all the week dates back to numbers i.e. 200910, I will need to rerun the script which I cannot do currently as I don't have the source files, or can I concatenate to an existing table? Gets messy!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 08 Nov 2009 19:19:16 GMT</pubDate>
    <dc:creator>picturebox</dc:creator>
    <dc:date>2009-11-08T19:19:16Z</dc:date>
    <item>
      <title>Set Analysis using a RANGE of weeknames</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-using-a-RANGE-of-weeknames/m-p/234615#M504318</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Community,&lt;/P&gt;&lt;P&gt;I am battling to get a range accepted in my set analysis. Using an if it looks like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;I&gt;&lt;/I&gt;&lt;I&gt;&lt;/I&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;sum(if ((CW&amp;lt;=&lt;B&gt;&lt;I&gt;'$(vMaxCW)'&lt;/I&gt;&lt;/B&gt;) and (CW&amp;gt;=&lt;B&gt;&lt;I&gt;'$(vMaxCW25)'&lt;/I&gt;&lt;/B&gt;), UnitMovement &lt;P&gt;))&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;where CW is in form of "weekname", i.e. 2009/36. SA is just so much faster ...&lt;/P&gt;&lt;P&gt;Can anyone help?&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Petra&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Nov 2009 20:03:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-using-a-RANGE-of-weeknames/m-p/234615#M504318</guid>
      <dc:creator>picturebox</dc:creator>
      <dc:date>2009-11-06T20:03:09Z</dc:date>
    </item>
    <item>
      <title>Set Analysis using a RANGE of weeknames</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-using-a-RANGE-of-weeknames/m-p/234616#M504319</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Greater than and less than are not allowed where you are putting them. In that place you are indicating what to do with the set, only =, -=, *=, /= (I think) are allowed. In order to use a range, you still want =, because you want to include the set. You should also be able to ditch the if.&lt;/P&gt;&lt;P&gt;This should work:&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;sum({&amp;lt;CW={"&amp;lt;=$(vMaxCW)&amp;gt;=$(vMaxCW25)"}&amp;gt;} UnitMovement)&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;EDIT: You need to include both in one set in order to make it an and and force both conditions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Nov 2009 21:38:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-using-a-RANGE-of-weeknames/m-p/234616#M504319</guid>
      <dc:creator />
      <dc:date>2009-11-06T21:38:49Z</dc:date>
    </item>
    <item>
      <title>Set Analysis using a RANGE of weeknames</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-using-a-RANGE-of-weeknames/m-p/234617#M504323</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;thanks for the answer. This does not work and I think it is because the vMaxCW variables are not correctly syntaxed and thus addressed to return the value. Normally you would use either '$(vMaxCW)' or "$(vMaxCW)" (double or single quotes) but in this SA it does not want to accept that syntax ...&lt;/P&gt;&lt;P&gt;Petra&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Nov 2009 22:10:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-using-a-RANGE-of-weeknames/m-p/234617#M504323</guid>
      <dc:creator>picturebox</dc:creator>
      <dc:date>2009-11-06T22:10:40Z</dc:date>
    </item>
    <item>
      <title>Set Analysis using a RANGE of weeknames</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-using-a-RANGE-of-weeknames/m-p/234618#M504324</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am using 8.5 ...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Nov 2009 22:12:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-using-a-RANGE-of-weeknames/m-p/234618#M504324</guid>
      <dc:creator>picturebox</dc:creator>
      <dc:date>2009-11-06T22:12:30Z</dc:date>
    </item>
    <item>
      <title>Set Analysis using a RANGE of weeknames</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-using-a-RANGE-of-weeknames/m-p/234619#M504325</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Could you give me an example of what your CW field contains and the values of your MaxCW variables?&lt;/P&gt;&lt;P&gt;I tend to get confused with which quotes to use. I've been able to use double-quotes and then use single quotes within. Something like:&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;sum({&amp;lt;CW={"&amp;lt;='$(vMaxCW)'&amp;gt;='$(vMaxCW25)'"}&amp;gt;} UnitMovement)&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;If your variables are text values, you could probably cheat by adding the single quotes into the variable definition. Really, it is all just speculation, because I don't know what your data looks like.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Nov 2009 23:10:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-using-a-RANGE-of-weeknames/m-p/234619#M504325</guid>
      <dc:creator />
      <dc:date>2009-11-06T23:10:16Z</dc:date>
    </item>
    <item>
      <title>Set Analysis using a RANGE of weeknames</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-using-a-RANGE-of-weeknames/m-p/234620#M504326</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;the CW (Calendar Week) would be a weekname i.e. 2009/26 ...the variables are set using&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=&lt;/P&gt;&lt;P&gt;weekname( MaxSalesWeek)&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;where weekname returns a format like: 2009/10 i.e. year/weeknumber.&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>Fri, 06 Nov 2009 23:38:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-using-a-RANGE-of-weeknames/m-p/234620#M504326</guid>
      <dc:creator>picturebox</dc:creator>
      <dc:date>2009-11-06T23:38:24Z</dc:date>
    </item>
    <item>
      <title>Set Analysis using a RANGE of weeknames</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-using-a-RANGE-of-weeknames/m-p/234621#M504327</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Have you verified that QlikView can evaluate &amp;gt;= a week like that?&lt;/P&gt;&lt;P&gt;I think the problem is that the variable is probably being returned as a string, while your CW field is probably a form of date field or a string.&lt;/P&gt;&lt;P&gt;You may need to convert the variables to be dates, so QlikView can evaluate the condition. Try putting your expression into a chart, but don't give the expression a label. Then when the chart is rendered, you should see the full expression with the variables in place. Are you getting {''} for your sets or is the variable values in there? Also, you should try hardcoding the values of those variables in and see if that works.&lt;/P&gt;&lt;P&gt;The Set Analysis syntax is correct, I think you are having issues with data types, that's why it's not working. I usually use 200910 for my weeks and that format can easily be evaluated as a number for comparison.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Nov 2009 23:56:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-using-a-RANGE-of-weeknames/m-p/234621#M504327</guid>
      <dc:creator />
      <dc:date>2009-11-06T23:56:13Z</dc:date>
    </item>
    <item>
      <title>Set Analysis using a RANGE of weeknames</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-using-a-RANGE-of-weeknames/m-p/234622#M504328</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I haven't played around with it any more right now, but I wonder why it works fine in an if statement, which I am currently using instead of the set analysis. If I need to change all the week dates back to numbers i.e. 200910, I will need to rerun the script which I cannot do currently as I don't have the source files, or can I concatenate to an existing table? Gets messy!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 08 Nov 2009 19:19:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-using-a-RANGE-of-weeknames/m-p/234622#M504328</guid>
      <dc:creator>picturebox</dc:creator>
      <dc:date>2009-11-08T19:19:16Z</dc:date>
    </item>
    <item>
      <title>Set Analysis using a RANGE of weeknames</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-using-a-RANGE-of-weeknames/m-p/234623#M504329</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm not sure why it would work in the if and not Set Analysis.&lt;/P&gt;&lt;P&gt;First, I would verify that the variables are coming out as you would expect them to. Make a simple chart and use your Set Analysis expression as the expression, but don't give it a label. Then render the chart and your Set Analysis expression should be the label. Expand it, so you can see what your variables are coming out as. Make sure you see {'2009/10'} or whatever they are in the expression.&lt;/P&gt;&lt;P&gt;You should also try to hardcode the values of your variables into a Set Analysis expression and see if you can get results. Does this work:&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;sum({&amp;lt;CW={"&amp;lt;='2009/15'&amp;gt;='2009/10'"}&amp;gt;} UnitMovement)&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;When I typed that out, it looks like my signs might have been switched.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Nov 2009 00:01:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-using-a-RANGE-of-weeknames/m-p/234623#M504329</guid>
      <dc:creator />
      <dc:date>2009-11-10T00:01:17Z</dc:date>
    </item>
  </channel>
</rss>

