<?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: Lookup equivalent value from expression result in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Lookup-equivalent-value-from-expression-result/m-p/1047134#M943048</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you may be create a sample which shows us what you are looking to do?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 07 Jan 2016 17:01:48 GMT</pubDate>
    <dc:creator>sunny_talwar</dc:creator>
    <dc:date>2016-01-07T17:01:48Z</dc:date>
    <item>
      <title>Lookup equivalent value from expression result</title>
      <link>https://community.qlik.com/t5/QlikView/Lookup-equivalent-value-from-expression-result/m-p/1047129#M943043</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a mapping table in my script which equates points to grades. The table is approx. 100 rows, and starts as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" style="border: 1px solid rgb(0, 0, 0); width: 100%;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;Points&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Grade&lt;/STRONG&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;45&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;D&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;46&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;D&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;47&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;D&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;48&lt;/TD&gt;&lt;TD&gt;C&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;49&lt;/TD&gt;&lt;TD&gt;C&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In my qvw, most of my expressions are built using the points (obviously, as I need a numerical value for my calculations). However, in some of my tables, I would like to show the grade equivalent. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have one table that shows the average of all candidates points against a yearly dimension, e.g.:&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" style="border: 1px solid rgb(0, 0, 0); width: 100%;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Year&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Points&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Grade&lt;/STRONG&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;2012&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;=AVG(Points)&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;2013&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;=AVG(Points)&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;2014&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;=AVG(Points)&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Obviously the value in the Points column changes according to different selections that are made. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can I show the equivalent grade too? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for any suggestions.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Jan 2016 15:45:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Lookup-equivalent-value-from-expression-result/m-p/1047129#M943043</guid>
      <dc:creator>jessica_webb</dc:creator>
      <dc:date>2016-01-07T15:45:15Z</dc:date>
    </item>
    <item>
      <title>Re: Lookup equivalent value from expression result</title>
      <link>https://community.qlik.com/t5/QlikView/Lookup-equivalent-value-from-expression-result/m-p/1047130#M943044</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Something like the attached?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Jan 2016 16:39:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Lookup-equivalent-value-from-expression-result/m-p/1047130#M943044</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-01-07T16:39:26Z</dc:date>
    </item>
    <item>
      <title>Re: Lookup equivalent value from expression result</title>
      <link>https://community.qlik.com/t5/QlikView/Lookup-equivalent-value-from-expression-result/m-p/1047131#M943045</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sunny, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This seems like a great start. But what if I don't want to include the 'Year' dimension in the expression? Ideally I'd like it to be separate from that as I have a LOT of data, and I can't easily create the inline table that you've used in your example. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So to use your example script, my 'Table' has &lt;/P&gt;&lt;P&gt;Load&lt;/P&gt;&lt;P&gt;Year,&lt;/P&gt;&lt;P&gt;Points,&lt;/P&gt;&lt;P&gt;ApplyMap('Grade_Map', 'Points') as Grade&lt;/P&gt;&lt;P&gt;etc&lt;/P&gt;&lt;P&gt;etc&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So if I created a straight table, then I would see what the points/grade equivalent is. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It's where I'm using the 'AVG' function that it all goes wrong. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Jan 2016 16:51:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Lookup-equivalent-value-from-expression-result/m-p/1047131#M943045</guid>
      <dc:creator>jessica_webb</dc:creator>
      <dc:date>2016-01-07T16:51:35Z</dc:date>
    </item>
    <item>
      <title>Re: Lookup equivalent value from expression result</title>
      <link>https://community.qlik.com/t5/QlikView/Lookup-equivalent-value-from-expression-result/m-p/1047132#M943046</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jessica,&lt;/P&gt;&lt;P&gt;I haven't test this expression so it might not work straight out of the box but what about this expression?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=FirstSortedValue({$&amp;lt;Points = {"&amp;lt;=$(=Avg(Points))"} &amp;gt;} Grade, -Points)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Jan 2016 16:56:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Lookup-equivalent-value-from-expression-result/m-p/1047132#M943046</guid>
      <dc:creator>effinty2112</dc:creator>
      <dc:date>2016-01-07T16:56:53Z</dc:date>
    </item>
    <item>
      <title>Re: Lookup equivalent value from expression result</title>
      <link>https://community.qlik.com/t5/QlikView/Lookup-equivalent-value-from-expression-result/m-p/1047133#M943047</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Andrew, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your help. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It's not working quite as it should - in a couple of instances I get no result at all (I think because the values are averages (i.e. they have decimal numbers), whereas my equivalence table is on whole numbers only). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But on the one instance it does give me a result, it's not what I would expect - e.g. for an average point score of 46, it gives me a result of 'C' (when it should be a 'D').&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Jan 2016 17:01:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Lookup-equivalent-value-from-expression-result/m-p/1047133#M943047</guid>
      <dc:creator>jessica_webb</dc:creator>
      <dc:date>2016-01-07T17:01:38Z</dc:date>
    </item>
    <item>
      <title>Re: Lookup equivalent value from expression result</title>
      <link>https://community.qlik.com/t5/QlikView/Lookup-equivalent-value-from-expression-result/m-p/1047134#M943048</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you may be create a sample which shows us what you are looking to do?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Jan 2016 17:01:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Lookup-equivalent-value-from-expression-result/m-p/1047134#M943048</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-01-07T17:01:48Z</dc:date>
    </item>
    <item>
      <title>Re: Lookup equivalent value from expression result</title>
      <link>https://community.qlik.com/t5/QlikView/Lookup-equivalent-value-from-expression-result/m-p/1047135#M943049</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Jessica,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Something's a bit odd. This formula with the inequality hard written as &lt;SPAN style="font-size: 13.3333px;"&gt;&amp;lt;=46 returns a 'D'&amp;nbsp; with the five lines of your mapping table loaded into my qvw.&lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/confused.png" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=FirstSortedValue({$&amp;lt;Points = {"&amp;lt;=46"} &amp;gt;} Grade, -Points)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=================================================&lt;/P&gt;&lt;P&gt;I've just realised something (I can be very slow). My method won't work on your mapping table as that table will not exist in the data model after the reload.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sorry! &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/blush.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Jan 2016 17:15:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Lookup-equivalent-value-from-expression-result/m-p/1047135#M943049</guid>
      <dc:creator>effinty2112</dc:creator>
      <dc:date>2016-01-07T17:15:39Z</dc:date>
    </item>
    <item>
      <title>Re: Lookup equivalent value from expression result</title>
      <link>https://community.qlik.com/t5/QlikView/Lookup-equivalent-value-from-expression-result/m-p/1047136#M943050</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Got you - no worries at all. Thanks for the suggestions anyway!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Jan 2016 07:53:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Lookup-equivalent-value-from-expression-result/m-p/1047136#M943050</guid>
      <dc:creator>jessica_webb</dc:creator>
      <dc:date>2016-01-08T07:53:17Z</dc:date>
    </item>
    <item>
      <title>Re: Lookup equivalent value from expression result</title>
      <link>https://community.qlik.com/t5/QlikView/Lookup-equivalent-value-from-expression-result/m-p/1047137#M943051</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sunny, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Unfortunately under a bit of time pressure so haven't managed to create a sample file. &lt;/P&gt;&lt;P&gt;As a temporary fix for now (so that I can send a demo to our client later today), I have used a very convoluted 'if' statement, which does work - but probably isn't great for overall efficiency! &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF(Avg(Points)&amp;gt;=89,'E9',IF(Avg(Points)&amp;gt;=88,'E8',IF(Avg(Points)&amp;gt;=87,'E7',IF(Avg(Points)&amp;gt;=86,'E6',IF(Avg(Points)&amp;gt;=85,'E5',IF(Avg(Points)&amp;gt;=84,'E4',IF(Avg(Points)&amp;gt;=83,'E3',IF(Avg(Points)&amp;gt;=82,'E2',IF(Avg(Points)&amp;gt;=81,'E1',IF(Avg(Points)&amp;gt;=80,'D9',IF(Avg(Points)&amp;gt;=79,'D8',IF(Avg(Points)&amp;gt;=78,'D7',IF(Avg(Points)&amp;gt;=77,'D6',IF(Avg(Points)&amp;gt;=76,'D5',IF(Avg(Points)&amp;gt;=75,'D4',IF(Avg(Points)&amp;gt;=74,'D3',IF(Avg(Points)&amp;gt;=73,'D2',IF(Avg(Points)&amp;gt;=72,'D1',IF(Avg(Points)&amp;gt;=71,'C9',IF(Avg(Points)&amp;gt;=70,'C8',IF(Avg(Points)&amp;gt;=69,'C7',IF(Avg(Points)&amp;gt;=68,'C6',IF(Avg(Points)&amp;gt;=67,'C5',IF(Avg(Points)&amp;gt;=66,'C4',IF(Avg(Points)&amp;gt;=65,'C3',IF(Avg(Points)&amp;gt;=64,'C2',IF(Avg(Points)&amp;gt;=63,'C1',IF(Avg(Points)&amp;gt;=62,'B9',IF(Avg(Points)&amp;gt;=61,'B8',IF(Avg(Points)&amp;gt;=60,'B7',IF(Avg(Points)&amp;gt;=59,'B6',IF(Avg(Points)&amp;gt;=58,'B5',IF(Avg(Points)&amp;gt;=57,'B4',IF(Avg(Points)&amp;gt;=56,'B3',IF(Avg(Points)&amp;gt;=55,'B2',IF(Avg(Points)&amp;gt;=54,'B1',IF(Avg(Points)&amp;gt;=53,'A9',IF(Avg(Points)&amp;gt;=52,'A8',IF(Avg(Points)&amp;gt;=51,'A7',IF(Avg(Points)&amp;gt;=50,'A6',IF(Avg(Points)&amp;gt;=49,'A5',IF(Avg(Points)&amp;gt;=48,'A4',IF(Avg(Points)&amp;gt;=47,'A3',IF(Avg(Points)&amp;gt;=46,'A2',IF(Avg(Points)&amp;gt;=45,'A1',IF(Avg(Points)&amp;gt;=44,'P8.9',IF(Avg(Points)&amp;gt;=43,'P8.8',IF(Avg(Points)&amp;gt;=42,'P8.7',IF(Avg(Points)&amp;gt;=41,'P8.6',IF(Avg(Points)&amp;gt;=40,'P8.5',IF(Avg(Points)&amp;gt;=39,'P8.4',IF(Avg(Points)&amp;gt;=38,'P8.3',IF(Avg(Points)&amp;gt;=37,'P8.2',IF(Avg(Points)&amp;gt;=36,'P8.1',IF(Avg(Points)&amp;gt;=35,'P7.9',IF(Avg(Points)&amp;gt;=34,'P7.8',IF(Avg(Points)&amp;gt;=33,'P7.7',IF(Avg(Points)&amp;gt;=32,'P7.6',IF(Avg(Points)&amp;gt;=31,'P7.5',IF(Avg(Points)&amp;gt;=30,'P7.4',IF(Avg(Points)&amp;gt;=29,'P7.3',IF(Avg(Points)&amp;gt;=28,'P7.2',IF(Avg(Points)&amp;gt;=27,'P7.1',IF(Avg(Points)&amp;gt;=26,'P6.9',IF(Avg(Points)&amp;gt;=25,'P6.8',IF(Avg(Points)&amp;gt;=24,'P6.7',IF(Avg(Points)&amp;gt;=23,'P6.6',IF(Avg(Points)&amp;gt;=22,'P6.5',IF(Avg(Points)&amp;gt;=21,'P6.4',IF(Avg(Points)&amp;gt;=20,'P6.3',IF(Avg(Points)&amp;gt;=19,'P6.2',IF(Avg(Points)&amp;gt;=18,'P6.1',IF(Avg(Points)&amp;gt;=17,'P5.9',IF(Avg(Points)&amp;gt;=16,'P5.8',IF(Avg(Points)&amp;gt;=15,'P5.7',IF(Avg(Points)&amp;gt;=14,'P5.6',IF(Avg(Points)&amp;gt;=13,'P5.5',IF(Avg(Points)&amp;gt;=12,'P5.4',IF(Avg(Points)&amp;gt;=11,'P5.3',IF(Avg(Points)&amp;gt;=10,'P5.2',IF(Avg(Points)&amp;gt;=9,'P5.1',IF(Avg(Points)&amp;gt;=8,'P4.9',IF(Avg(Points)&amp;gt;=7,'P4.8',IF(Avg(Points)&amp;gt;=6,'P4.7',IF(Avg(Points)&amp;gt;=5,'P4.6',IF(Avg(Points)&amp;gt;=4,'P4.5',IF(Avg(Points)&amp;gt;=3,'P4.4',IF(Avg(Points)&amp;gt;=2,'P4.3',IF(Avg(Points)&amp;gt;=1,'P4.2',IF(Avg(Points)&amp;gt;=0,'P4.1'&lt;/P&gt;&lt;P&gt;))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Probably Qlikview's worst expression ever, but it'll have to do for now...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Jan 2016 07:57:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Lookup-equivalent-value-from-expression-result/m-p/1047137#M943051</guid>
      <dc:creator>jessica_webb</dc:creator>
      <dc:date>2016-01-08T07:57:51Z</dc:date>
    </item>
  </channel>
</rss>

