<?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: double comparison in one in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/double-comparison-in-one/m-p/666770#M1061697</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I mean, I would like to use "expression" only one time. This need comes from the fact that the expression I'm talking about is too long and complicated and qlik doesn't work well.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 06 Oct 2014 16:18:55 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2014-10-06T16:18:55Z</dc:date>
    <item>
      <title>double comparison in one</title>
      <link>https://community.qlik.com/t5/QlikView/double-comparison-in-one/m-p/666767#M1061690</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi community,&lt;/P&gt;&lt;P&gt;is it possible to obtain a result like that:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(&lt;/P&gt;&lt;P&gt;expression &amp;gt;30&lt;/P&gt;&lt;P&gt;and&lt;/P&gt;&lt;P&gt;expression&amp;lt;60&lt;/P&gt;&lt;P&gt;,1,0)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;using "expression" just one time?&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;IB&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Oct 2014 15:34:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/double-comparison-in-one/m-p/666767#M1061690</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-10-06T15:34:47Z</dc:date>
    </item>
    <item>
      <title>Re: double comparison in one</title>
      <link>https://community.qlik.com/t5/QlikView/double-comparison-in-one/m-p/666768#M1061693</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Si Irene,&lt;/P&gt;&lt;P&gt;definisci espressione nello script in questo modo:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;let MyExpr =&amp;nbsp; espressione;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ed usa la variabile MyExpr nel tuo&amp;nbsp; if &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Oct 2014 15:46:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/double-comparison-in-one/m-p/666768#M1061693</guid>
      <dc:creator>alexandros17</dc:creator>
      <dc:date>2014-10-06T15:46:40Z</dc:date>
    </item>
    <item>
      <title>Re: double comparison in one</title>
      <link>https://community.qlik.com/t5/QlikView/double-comparison-in-one/m-p/666769#M1061695</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You mean in one line you want to have this expression?&lt;/P&gt;&lt;P&gt;or what&amp;nbsp; do you mean by "&lt;STRONG&gt;just one time?&lt;/STRONG&gt;"&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Oct 2014 15:47:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/double-comparison-in-one/m-p/666769#M1061695</guid>
      <dc:creator>mjayachandran</dc:creator>
      <dc:date>2014-10-06T15:47:00Z</dc:date>
    </item>
    <item>
      <title>Re: double comparison in one</title>
      <link>https://community.qlik.com/t5/QlikView/double-comparison-in-one/m-p/666770#M1061697</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I mean, I would like to use "expression" only one time. This need comes from the fact that the expression I'm talking about is too long and complicated and qlik doesn't work well.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Oct 2014 16:18:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/double-comparison-in-one/m-p/666770#M1061697</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-10-06T16:18:55Z</dc:date>
    </item>
    <item>
      <title>Re: double comparison in one</title>
      <link>https://community.qlik.com/t5/QlikView/double-comparison-in-one/m-p/666771#M1061698</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You should copy and paste that expression between ( ) and then add the &amp;gt; 30, an 'AND' and again the expression with the 2do condition. Or use a variable and put that expression in it, and again:&amp;nbsp; the both conditions with the expression, separated with an 'AND'. &lt;/P&gt;&lt;P&gt;If you are asking to use just 1 time the expression like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;30 &amp;lt; expression &amp;lt; 60&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can't. Unless a function provides it (in this case should be something like a "between").&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Oct 2014 17:27:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/double-comparison-in-one/m-p/666771#M1061698</guid>
      <dc:creator />
      <dc:date>2014-10-06T17:27:52Z</dc:date>
    </item>
    <item>
      <title>Re: double comparison in one</title>
      <link>https://community.qlik.com/t5/QlikView/double-comparison-in-one/m-p/666772#M1061699</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It is best practice to put your expressions in variables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for instance:&lt;/P&gt;&lt;P&gt;if you have the evaluation&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(sum({$&amp;lt;Year={'2014'},Sector={Finance},SomeFlag={1},SomeOtherFlag={0}&amp;gt;}Amount)&amp;gt;30&lt;BR /&gt;and&lt;/P&gt;&lt;P&gt;sum({$&amp;lt;Year={'2014'},Sector={Finance},SomeFlag={1},SomeOtherFlag={0}&amp;gt;}Amount)&amp;lt;60&lt;BR /&gt;,1,0)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Go to your variable overview: Settings - Variable Overview. Press Add and give it a name: vExpression. Scroll down to it and select it. In the "Definition" field you write:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum({$&amp;lt;Year={'2014'},Sector={Finance},SomeFlag={1},SomeOtherFlag={0}&amp;gt;}Amount)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then the evaluation becomes:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if($(vExpression)&amp;gt;30 and $(vExpression)&amp;lt;60,1,0)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Hope this helps&lt;BR /&gt;SKG&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Oct 2014 17:34:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/double-comparison-in-one/m-p/666772#M1061699</guid>
      <dc:creator>simenkg</dc:creator>
      <dc:date>2014-10-06T17:34:27Z</dc:date>
    </item>
    <item>
      <title>Re: double comparison in one</title>
      <link>https://community.qlik.com/t5/QlikView/double-comparison-in-one/m-p/666773#M1061700</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not completely sure if this addresses your question, but you can define the expression in the script area and then call it later using dollar sign expansion:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LET expression = 5 + 30;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If $(expression) &amp;gt; 30 Then …&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Oct 2014 17:35:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/double-comparison-in-one/m-p/666773#M1061700</guid>
      <dc:creator />
      <dc:date>2014-10-06T17:35:35Z</dc:date>
    </item>
    <item>
      <title>Re: double comparison in one</title>
      <link>https://community.qlik.com/t5/QlikView/double-comparison-in-one/m-p/666774#M1061701</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;if (expression between 30 and 60,...,...)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Oct 2014 17:47:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/double-comparison-in-one/m-p/666774#M1061701</guid>
      <dc:creator />
      <dc:date>2014-10-06T17:47:44Z</dc:date>
    </item>
  </channel>
</rss>

