<?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 Between values in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Between-values/m-p/343945#M126991</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm using a pretty complicated statement in an expression - here's a simplified version:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;aggr&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;rank&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;aggr&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;Loss_Amount&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;),&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;Dimension1&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;Year&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;),4,1),&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 12px; font-family: 'Courier New';"&gt;Dimension1&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;Year&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;)=1000,&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 9.0pt; font-family: 'Courier New';"&gt;'X','Y')&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 9pt; font-family: 'Courier New';"&gt;&lt;SPAN style="color: #000014;"&gt;Instead of saying equal to 1000, I'd like it to be between 996 and 1005. Is there an easy way to do this, or will I have to use an AND function? I'd really prefer not to have it calculate the aggr statement twice.&lt;/SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 10 Jul 2012 19:53:47 GMT</pubDate>
    <dc:creator>danielact</dc:creator>
    <dc:date>2012-07-10T19:53:47Z</dc:date>
    <item>
      <title>Between values</title>
      <link>https://community.qlik.com/t5/QlikView/Between-values/m-p/343945#M126991</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm using a pretty complicated statement in an expression - here's a simplified version:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;aggr&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;rank&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;aggr&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;Loss_Amount&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;),&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;Dimension1&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;Year&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;),4,1),&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 12px; font-family: 'Courier New';"&gt;Dimension1&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;Year&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;)=1000,&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 9.0pt; font-family: 'Courier New';"&gt;'X','Y')&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 9pt; font-family: 'Courier New';"&gt;&lt;SPAN style="color: #000014;"&gt;Instead of saying equal to 1000, I'd like it to be between 996 and 1005. Is there an easy way to do this, or will I have to use an AND function? I'd really prefer not to have it calculate the aggr statement twice.&lt;/SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Jul 2012 19:53:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Between-values/m-p/343945#M126991</guid>
      <dc:creator>danielact</dc:creator>
      <dc:date>2012-07-10T19:53:47Z</dc:date>
    </item>
    <item>
      <title>Re: Between values</title>
      <link>https://community.qlik.com/t5/QlikView/Between-values/m-p/343946#M126992</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;You can use variable like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;vTest = &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;aggr&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;rank&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;aggr&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;sum&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: maroon; font-size: 9pt;"&gt;Loss_Amount&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;),&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: maroon; font-size: 9pt;"&gt;Dimension1&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: maroon; font-size: 9pt;"&gt;Year&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;),4,1),&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: #800000; font-size: 12px;"&gt;Dimension1&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: maroon; font-size: 9pt;"&gt;Year&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;And then use like this,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;if(vTest &amp;gt; 995 and vTest &amp;lt; 1006 ,'X', 'Y')&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;Hope it helps&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Jul 2012 20:35:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Between-values/m-p/343946#M126992</guid>
      <dc:creator>MayilVahanan</dc:creator>
      <dc:date>2012-07-10T20:35:14Z</dc:date>
    </item>
    <item>
      <title>Re: Between values</title>
      <link>https://community.qlik.com/t5/QlikView/Between-values/m-p/343947#M126993</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here's something that works with simple field names to test if they are between two values. For your more complex expression it will need some trial and error...&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Begin by defining a variable named &lt;EM&gt;check_between &lt;/EM&gt;with this value&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;if( ($1) &amp;gt;= ($2) and ($1) &amp;lt;= ($3), 1, 0)&amp;nbsp; &lt;/STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Then, if you wanted to test if a field named myfield was between 996 and 1005 you would write the expression like this&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;=if( $(check_between( myfield, 996, 1005), 'X', 'Y')&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Jul 2012 21:44:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Between-values/m-p/343947#M126993</guid>
      <dc:creator />
      <dc:date>2012-07-10T21:44:04Z</dc:date>
    </item>
  </channel>
</rss>

