<?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 Find a value between a numeric range in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Find-a-value-between-a-numeric-range/m-p/683898#M247914</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;IMG __jive_id="63428" alt="screenshot.png" class="jive-image" src="https://community.qlik.com/legacyfs/online/63428_screenshot.png" style="width: 620px; height: 198px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the screenshot, you can see the data model up top and the required straight table in the bottom.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There is a student named John, who has scores in different subjects. These scores are evaluated among different ranges and received certain points (I have highlighted the values for John), and then the sum of the points determines the grade. Please note that "GradingScheme" table is not linked to any other table in the data model (this is intentional)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am able to figure out the Expression1 which is the sum of all available points for John (for e.g. sumPoints) for any student, but I am not able to figure out the Expression2 which is to calculate the grade.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have tried some of these:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MaxString(if(sumPoints &amp;gt;= MinPoints AND sumPoints &amp;lt;= MaxPoints, Grade))&lt;/P&gt;&lt;P&gt;MaxString({&amp;lt;MinPoints={"&amp;lt;=(sumPoints)"},MaxPoints={"&amp;gt;=$(sumPoints)"}&amp;gt;}Grade)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But it always gives out the - as the Expression2 value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you.&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 30 Jul 2014 16:42:41 GMT</pubDate>
    <dc:creator>sohailansari201</dc:creator>
    <dc:date>2014-07-30T16:42:41Z</dc:date>
    <item>
      <title>Find a value between a numeric range</title>
      <link>https://community.qlik.com/t5/QlikView/Find-a-value-between-a-numeric-range/m-p/683898#M247914</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;IMG __jive_id="63428" alt="screenshot.png" class="jive-image" src="https://community.qlik.com/legacyfs/online/63428_screenshot.png" style="width: 620px; height: 198px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the screenshot, you can see the data model up top and the required straight table in the bottom.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There is a student named John, who has scores in different subjects. These scores are evaluated among different ranges and received certain points (I have highlighted the values for John), and then the sum of the points determines the grade. Please note that "GradingScheme" table is not linked to any other table in the data model (this is intentional)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am able to figure out the Expression1 which is the sum of all available points for John (for e.g. sumPoints) for any student, but I am not able to figure out the Expression2 which is to calculate the grade.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have tried some of these:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MaxString(if(sumPoints &amp;gt;= MinPoints AND sumPoints &amp;lt;= MaxPoints, Grade))&lt;/P&gt;&lt;P&gt;MaxString({&amp;lt;MinPoints={"&amp;lt;=(sumPoints)"},MaxPoints={"&amp;gt;=$(sumPoints)"}&amp;gt;}Grade)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But it always gives out the - as the Expression2 value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you.&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Jul 2014 16:42:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Find-a-value-between-a-numeric-range/m-p/683898#M247914</guid>
      <dc:creator>sohailansari201</dc:creator>
      <dc:date>2014-07-30T16:42:41Z</dc:date>
    </item>
    <item>
      <title>Re: Find a value between a numeric range</title>
      <link>https://community.qlik.com/t5/QlikView/Find-a-value-between-a-numeric-range/m-p/683899#M247915</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Have u tried it using interval match function?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Jul 2014 17:25:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Find-a-value-between-a-numeric-range/m-p/683899#M247915</guid>
      <dc:creator />
      <dc:date>2014-07-30T17:25:24Z</dc:date>
    </item>
    <item>
      <title>Re: Find a value between a numeric range</title>
      <link>https://community.qlik.com/t5/QlikView/Find-a-value-between-a-numeric-range/m-p/683900#M247916</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Soumya, but I believe that Interval Match only works script load area. Whereas this needs to be done on the expression level in a straight table.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Thank you,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Jul 2014 17:38:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Find-a-value-between-a-numeric-range/m-p/683900#M247916</guid>
      <dc:creator>sohailansari201</dc:creator>
      <dc:date>2014-07-30T17:38:15Z</dc:date>
    </item>
    <item>
      <title>Re: Find a value between a numeric range</title>
      <link>https://community.qlik.com/t5/QlikView/Find-a-value-between-a-numeric-range/m-p/683901#M247917</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;Try a simple IF, something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If(Sum(Points)&amp;gt;=75 and Sum(Points)&amp;lt;=100,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'A',&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(Sum(Points)&amp;gt;=50 and Sum(Points)&amp;lt;=74,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'B',&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'C'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; )&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It's rustic but works.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or try using a Class function but the problem with class is you need to specify a static increment for example 25 and you have segments 0-25, 26-50, 51-75, 76-100 ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Jul 2014 18:03:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Find-a-value-between-a-numeric-range/m-p/683901#M247917</guid>
      <dc:creator />
      <dc:date>2014-07-30T18:03:25Z</dc:date>
    </item>
    <item>
      <title>Re: Find a value between a numeric range</title>
      <link>https://community.qlik.com/t5/QlikView/Find-a-value-between-a-numeric-range/m-p/683902#M247918</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Oswaldo,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It works with this type of 'hardcoded' grades. The requirement is not to hardcode the grade in the if condition. Because the values will be changing in the GradingScheme table. It has to read the &lt;STRONG&gt;Grade&lt;/STRONG&gt; from the GradingScheme table like for e.g.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;If(Sum(Points)&amp;gt;=&lt;STRONG&gt;MinPoints&lt;/STRONG&gt; and Sum(Points)&amp;lt;=&lt;STRONG&gt;MaxPoints&lt;/STRONG&gt;, &lt;STRONG&gt;Grade&lt;/STRONG&gt;)&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Thanks again.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Jul 2014 18:11:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Find-a-value-between-a-numeric-range/m-p/683902#M247918</guid>
      <dc:creator>sohailansari201</dc:creator>
      <dc:date>2014-07-30T18:11:30Z</dc:date>
    </item>
    <item>
      <title>Re: Find a value between a numeric range</title>
      <link>https://community.qlik.com/t5/QlikView/Find-a-value-between-a-numeric-range/m-p/683903#M247919</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Anyone please?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Jul 2014 20:12:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Find-a-value-between-a-numeric-range/m-p/683903#M247919</guid>
      <dc:creator>sohailansari201</dc:creator>
      <dc:date>2014-07-30T20:12:51Z</dc:date>
    </item>
  </channel>
</rss>

