<?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: How to set and use a variable in an expression in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/How-to-set-and-use-a-variable-in-an-expression/m-p/1359729#M416881</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;May be try this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;If(Only({&amp;lt;overcrowded_rate&amp;gt;} overcrowded_rate) &amp;lt;= (Max({&amp;lt;overcrowded_rate&amp;gt;} TOTAL overcrowded_rate)/100*20), 'Lowest 20%',&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;If(Only({&amp;lt;overcrowded_rate&amp;gt;} overcrowded_rate) &amp;lt; (Max({&amp;lt;overcrowded_rate&amp;gt;} TOTAL overcrowded_rate)/100*80), 'Middle 60%',&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;If(Only({&amp;lt;overcrowded_rate&amp;gt;} overcrowded_rate) &amp;gt;= (Max({&amp;lt;overcrowded_rate&amp;gt;} TOTAL overcrowded_rate)/100*80), 'Highest 20%',&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;Null())))&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Or this&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;STRONG&gt;If(Only({1} overcrowded_rate) &amp;lt;= (Max({&lt;STRONG style="font-size: 13.3333px;"&gt;1&lt;/STRONG&gt;} TOTAL overcrowded_rate)/100*20), 'Lowest 20%',&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;STRONG&gt;If(Only({&lt;STRONG style="font-size: 13.3333px;"&gt;1&lt;/STRONG&gt;} overcrowded_rate) &amp;lt; (Max({&lt;STRONG style="font-size: 13.3333px;"&gt;1&lt;/STRONG&gt;} TOTAL overcrowded_rate)/100*80), 'Middle 60%',&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;STRONG&gt;If(Only({&lt;STRONG style="font-size: 13.3333px;"&gt;1&lt;/STRONG&gt;} overcrowded_rate) &amp;gt;= (Max({&lt;STRONG style="font-size: 13.3333px;"&gt;1&lt;/STRONG&gt;} TOTAL overcrowded_rate)/100*80), 'Highest 20%',&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;Null())))&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 07 Aug 2017 12:19:55 GMT</pubDate>
    <dc:creator>sunny_talwar</dc:creator>
    <dc:date>2017-08-07T12:19:55Z</dc:date>
    <item>
      <title>How to set and use a variable in an expression</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-set-and-use-a-variable-in-an-expression/m-p/1359727#M416879</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In Qlik Sense I was looking to make a dimension which allows filtering by the lowest 20%, middle 60% and the Highest 20% &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so my expression was &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=&lt;/P&gt;&lt;P&gt;If(overcrowded_rate &amp;lt;= $(=Max(overcrowded_rate)/100*20), 'Lowest 20%',&lt;/P&gt;&lt;P&gt;If(overcrowded_rate &amp;lt; $(=Max(overcrowded_rate)/100*80), 'Middle 60%',&lt;/P&gt;&lt;P&gt;If(overcrowded_rate &amp;gt;= $(=Max(overcrowded_rate)/100*80), 'Highest 20%',&lt;/P&gt;&lt;P&gt;null())))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But when i use this the filtering is allowed but you can filter for the middle 60% of the middle 60%&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can this expression be changed so that it only can be applied once &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Aug 2017 09:49:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-set-and-use-a-variable-in-an-expression/m-p/1359727#M416879</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-08-07T09:49:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to set and use a variable in an expression</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-set-and-use-a-variable-in-an-expression/m-p/1359728#M416880</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How about this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If(overcrowded_rate &amp;lt;= Max(TOTAL overcrowded_rate)/100*20, 'Lowest 20%',&lt;/P&gt;&lt;P&gt;If(overcrowded_rate &amp;lt; Max(TOTAL overcrowded_rate)/100*80, 'Middle 60%',&lt;/P&gt;&lt;P&gt;If(overcrowded_rate &amp;gt;= Max(TOTAL overcrowded_rate)/100*80), 'Highest 20%',&lt;/P&gt;&lt;P&gt;null())))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Aug 2017 09:58:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-set-and-use-a-variable-in-an-expression/m-p/1359728#M416880</guid>
      <dc:creator>Anil_Babu_Samineni</dc:creator>
      <dc:date>2017-08-07T09:58:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to set and use a variable in an expression</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-set-and-use-a-variable-in-an-expression/m-p/1359729#M416881</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;May be try this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;If(Only({&amp;lt;overcrowded_rate&amp;gt;} overcrowded_rate) &amp;lt;= (Max({&amp;lt;overcrowded_rate&amp;gt;} TOTAL overcrowded_rate)/100*20), 'Lowest 20%',&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;If(Only({&amp;lt;overcrowded_rate&amp;gt;} overcrowded_rate) &amp;lt; (Max({&amp;lt;overcrowded_rate&amp;gt;} TOTAL overcrowded_rate)/100*80), 'Middle 60%',&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;If(Only({&amp;lt;overcrowded_rate&amp;gt;} overcrowded_rate) &amp;gt;= (Max({&amp;lt;overcrowded_rate&amp;gt;} TOTAL overcrowded_rate)/100*80), 'Highest 20%',&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;Null())))&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Or this&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;STRONG&gt;If(Only({1} overcrowded_rate) &amp;lt;= (Max({&lt;STRONG style="font-size: 13.3333px;"&gt;1&lt;/STRONG&gt;} TOTAL overcrowded_rate)/100*20), 'Lowest 20%',&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;STRONG&gt;If(Only({&lt;STRONG style="font-size: 13.3333px;"&gt;1&lt;/STRONG&gt;} overcrowded_rate) &amp;lt; (Max({&lt;STRONG style="font-size: 13.3333px;"&gt;1&lt;/STRONG&gt;} TOTAL overcrowded_rate)/100*80), 'Middle 60%',&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;STRONG&gt;If(Only({&lt;STRONG style="font-size: 13.3333px;"&gt;1&lt;/STRONG&gt;} overcrowded_rate) &amp;gt;= (Max({&lt;STRONG style="font-size: 13.3333px;"&gt;1&lt;/STRONG&gt;} TOTAL overcrowded_rate)/100*80), 'Highest 20%',&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;Null())))&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Aug 2017 12:19:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-set-and-use-a-variable-in-an-expression/m-p/1359729#M416881</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2017-08-07T12:19:55Z</dc:date>
    </item>
  </channel>
</rss>

