<?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: Why doesn't Set Expressions with modifier accept negative numbers as constants in an element list? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Why-doesn-t-Set-Expressions-with-modifier-accept-negative/m-p/978495#M979117</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;But the exclusion operator should come either before the equal sign or before the first curly braces anyway - shouldn't it?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 24 Aug 2015 06:13:24 GMT</pubDate>
    <dc:creator>petter</dc:creator>
    <dc:date>2015-08-24T06:13:24Z</dc:date>
    <item>
      <title>Why doesn't Set Expressions with modifier accept negative numbers as constants in an element list?</title>
      <link>https://community.qlik.com/t5/QlikView/Why-doesn-t-Set-Expressions-with-modifier-accept-negative/m-p/978492#M979114</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;&lt;/P&gt;&lt;P&gt;I am used to writing set expressions like these:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sum( { &amp;lt;rDate={1,2,3,4,5}&amp;gt; }&amp;nbsp; Sales )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would also like to use something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sum( { &amp;lt;rDate={-1,-2,-3,-4-,-5}&amp;gt; } Sales )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But that doesn't work very well. From all my tests I can only conclude that listing numbers will only work with positive numbers. As soon as I involve negative numbers the numbers has to be quoted like they were strings... which they obviously are not. &lt;STRONG&gt;Is this just a quirk that I have to accept in QlikView or am I missing something here?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This will work:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sum( { &amp;lt;rDate={'-1','-2','-3','-4','-5'}&amp;gt; } Sales )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It seems a bit like a weird thing not to accept a minus in front of a number and accept it as negative. I can certainly live with it but it seems very clumsy.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Aug 2015 05:28:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Why-doesn-t-Set-Expressions-with-modifier-accept-negative/m-p/978492#M979114</guid>
      <dc:creator>petter</dc:creator>
      <dc:date>2015-08-24T05:28:25Z</dc:date>
    </item>
    <item>
      <title>Re: Why doesn't Set Expressions with modifier accept negative numbers as constants in an element list?</title>
      <link>https://community.qlik.com/t5/QlikView/Why-doesn-t-Set-Expressions-with-modifier-accept-negative/m-p/978493#M979115</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Right, it seems QV parser to get confused with the &lt;SPAN style="text-decoration: underline;"&gt;Exclusion Operator '-'&lt;/SPAN&gt; and negative symbol '-'.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Aug 2015 05:53:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Why-doesn-t-Set-Expressions-with-modifier-accept-negative/m-p/978493#M979115</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2015-08-24T05:53:30Z</dc:date>
    </item>
    <item>
      <title>Re: Why doesn't Set Expressions with modifier accept negative numbers as constants in an element list?</title>
      <link>https://community.qlik.com/t5/QlikView/Why-doesn-t-Set-Expressions-with-modifier-accept-negative/m-p/978494#M979116</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I didn't think of that - you are possible right &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Aug 2015 05:58:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Why-doesn-t-Set-Expressions-with-modifier-accept-negative/m-p/978494#M979116</guid>
      <dc:creator>petter</dc:creator>
      <dc:date>2015-08-24T05:58:47Z</dc:date>
    </item>
    <item>
      <title>Re: Why doesn't Set Expressions with modifier accept negative numbers as constants in an element list?</title>
      <link>https://community.qlik.com/t5/QlikView/Why-doesn-t-Set-Expressions-with-modifier-accept-negative/m-p/978495#M979117</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;But the exclusion operator should come either before the equal sign or before the first curly braces anyway - shouldn't it?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Aug 2015 06:13:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Why-doesn-t-Set-Expressions-with-modifier-accept-negative/m-p/978495#M979117</guid>
      <dc:creator>petter</dc:creator>
      <dc:date>2015-08-24T06:13:24Z</dc:date>
    </item>
    <item>
      <title>Re: Why doesn't Set Expressions with modifier accept negative numbers as constants in an element list?</title>
      <link>https://community.qlik.com/t5/QlikView/Why-doesn-t-Set-Expressions-with-modifier-accept-negative/m-p/978496#M979118</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;For me it looked like a bug then with '-1' ... it queries a string - meant this a negative number and a string with a negative number will return the same result? Or won't the string-case match?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;An alternatively which isn't so confusing could be to use a search-function within the set analysis:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sum( { &amp;lt;rDate={"$(=match(rDate, -1,-2,-3,-4,-5))"}&amp;gt; } Sales )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Aug 2015 11:10:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Why-doesn-t-Set-Expressions-with-modifier-accept-negative/m-p/978496#M979118</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2015-08-24T11:10:55Z</dc:date>
    </item>
    <item>
      <title>Re: Why doesn't Set Expressions with modifier accept negative numbers as constants in an element list?</title>
      <link>https://community.qlik.com/t5/QlikView/Why-doesn-t-Set-Expressions-with-modifier-accept-negative/m-p/978497#M979119</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Perhaps, single quotes don't essentially cause a string transformation, but find for &lt;SPAN style="text-decoration: underline;"&gt;exact match.&lt;/SPAN&gt; Or, may be after converting it to string qv handles the values intelligently; for numeric and strings accordingly. And it is seen that qv is good enough to identify data types and operate, like :&lt;/P&gt;&lt;P&gt;Left('12AA',2)+10 ... works fine without having to convert the string to number.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Aug 2015 11:33:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Why-doesn-t-Set-Expressions-with-modifier-accept-negative/m-p/978497#M979119</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2015-08-24T11:33:49Z</dc:date>
    </item>
    <item>
      <title>Re: Why doesn't Set Expressions with modifier accept negative numbers as constants in an element list?</title>
      <link>https://community.qlik.com/t5/QlikView/Why-doesn-t-Set-Expressions-with-modifier-accept-negative/m-p/978498#M979120</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I've never had a problem that the set analysis does not correctly handle the (quoted) negative numbers , although I agree that it's odd that you have to quote them.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Aug 2015 11:52:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Why-doesn-t-Set-Expressions-with-modifier-accept-negative/m-p/978498#M979120</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2015-08-24T11:52:04Z</dc:date>
    </item>
    <item>
      <title>Re: Why doesn't Set Expressions with modifier accept negative numbers as constants in an element list?</title>
      <link>https://community.qlik.com/t5/QlikView/Why-doesn-t-Set-Expressions-with-modifier-accept-negative/m-p/978499#M979121</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As a corollary, it is not necessary to quote strings if they contain no spaces or reserved characters:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Sum{&amp;lt;AField = {SomeValue}&amp;gt;} Amount)&amp;nbsp;&amp;nbsp; -works perfectly (and the syntax checker does not complain)&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Sum{&amp;lt;AField = {Some Value}&amp;gt;} Amount)&amp;nbsp;&amp;nbsp; - does not work&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;Which makes it even more odd that negative numbers should be quoted)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;--Last checked on SR9...&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Aug 2015 11:55:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Why-doesn-t-Set-Expressions-with-modifier-accept-negative/m-p/978499#M979121</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2015-08-24T11:55:12Z</dc:date>
    </item>
  </channel>
</rss>

