<?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: Still no VLookup? in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Still-no-VLookup/m-p/1849376#M70204</link>
    <description>&lt;P&gt;Yes but I don't want to do this in a table, it needs to be transposed to several separate buttons (or any shapes).&lt;/P&gt;
&lt;P&gt;With this mapping I managed to use an easier way to colour the background of the 'State' column items in a table by setting 'StateColor' as 'Background color expression'.&lt;/P&gt;
&lt;P&gt;I can set the background colour of a button to 'StateColor' but the button doesn't &lt;EM&gt;understand&lt;/EM&gt; what it is. I have the feeling I'm on the right track though! Does its 'Label' need a specific syntax or can filling in a certain syntax in the 'Calculation condition' or 'Enable chart' solve this?&lt;/P&gt;</description>
    <pubDate>Wed, 20 Oct 2021 11:24:27 GMT</pubDate>
    <dc:creator>TimmyCNHi</dc:creator>
    <dc:date>2021-10-20T11:24:27Z</dc:date>
    <item>
      <title>Still no VLookup?</title>
      <link>https://community.qlik.com/t5/App-Development/Still-no-VLookup/m-p/1848667#M70142</link>
      <description>&lt;P&gt;The goal is simple: access a table, find a value of one column and match it with the value of another column in the same row. The road to get there in QS, however, doesn't seem to be so simple. Or is it?&lt;/P&gt;
&lt;P&gt;Let's take this load script:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;LOAD
    Type,
    State
FROM [lib://FRUIT_MANAGEMENT/FruitMan.xlsx]
(ooxml, embedded labels, table is "Basket");&lt;/LI-CODE&gt;
&lt;P&gt;Which generates the following table:&lt;/P&gt;
&lt;TABLE border="1" width="100%"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="50%" height="24px"&gt;&lt;STRONG&gt;Type&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD width="50%" height="24px"&gt;&lt;STRONG&gt;State&lt;/STRONG&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="50%" height="24px"&gt;Apple&lt;/TD&gt;
&lt;TD width="50%" height="24px"&gt;Fresh&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="50%" height="24px"&gt;Pear&lt;/TD&gt;
&lt;TD width="50%" height="24px"&gt;Rotten&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="50%" height="24px"&gt;Orange&lt;/TD&gt;
&lt;TD width="50%" height="24px"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="50%" height="24px"&gt;Banana&lt;/TD&gt;
&lt;TD width="50%" height="24px"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="50%" height="24px"&gt;Tomato&lt;/TD&gt;
&lt;TD width="50%" height="24px"&gt;Fresh&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&lt;BR /&gt;I have a dashboard with a basket chart (yes, I just made that up), which looks like this:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="TimmyCNHi_0-1634633029900.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/64709iF6CBC72687D446F3/image-size/medium?v=v2&amp;amp;px=400" role="button" title="TimmyCNHi_0-1634633029900.png" alt="TimmyCNHi_0-1634633029900.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;The goal here is to colour the text boxes based on a fruit's state:&lt;BR /&gt;Fresh = Green (#00a708)&lt;BR /&gt;Rotten = Red (#ff002a)&lt;BR /&gt;(blank) = Blue (#0018ff)&lt;/P&gt;
&lt;P&gt;Eg. If the apple turns rotten, its box colour should change from green to red on a data refresh.&lt;/P&gt;
&lt;P&gt;In Excel this would be fairly simple:&lt;/P&gt;
&lt;P&gt;=VLOOKUP(A2;A1:B6;2;FALSE)&lt;/P&gt;
&lt;P&gt;Which would return: Fresh&lt;/P&gt;
&lt;P&gt;So to make the colouring work it would need something like:&lt;/P&gt;
&lt;P&gt;=IF(VLOOKUP(A2;A1:B6;2;FALSE)="Fresh";"#00a708";IF(VLOOKUP(A2;A1:B6;2;FALSE)="Rotten";"#ff002a";"#0018ff"))&lt;/P&gt;
&lt;P&gt;Say I have the same table as loaded above, how could I make these colours work in my Qlik Sense basket chart visualisation? I could be using a Button and I'm trying to set the Background under Appearance 'By expression'.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="TimmyCNHi_1-1634634310896.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/64714i604F12CCF3563CA2/image-size/medium?v=v2&amp;amp;px=400" role="button" title="TimmyCNHi_1-1634634310896.png" alt="TimmyCNHi_1-1634634310896.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Thank you for your time!&lt;/P&gt;</description>
      <pubDate>Tue, 19 Oct 2021 09:15:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Still-no-VLookup/m-p/1848667#M70142</guid>
      <dc:creator>TimmyCNHi</dc:creator>
      <dc:date>2021-10-19T09:15:06Z</dc:date>
    </item>
    <item>
      <title>Re: Still no VLookup?</title>
      <link>https://community.qlik.com/t5/App-Development/Still-no-VLookup/m-p/1848899#M70154</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;pick(match(State,'Fresh','Rotten',''),green(),red(),blue())&lt;/STRONG&gt;&amp;nbsp; &amp;nbsp;creates this:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jbhappysocks_0-1634651139568.png" style="width: 252px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/64747i9F84D9876C04DE33/image-dimensions/252x278?v=v2" width="252" height="278" role="button" title="jbhappysocks_0-1634651139568.png" alt="jbhappysocks_0-1634651139568.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Not as fancy as you basket chart, but you get the idea.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Your hex codes needs to be converted to rgb()-codes if you want the exact colors.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Oct 2021 13:49:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Still-no-VLookup/m-p/1848899#M70154</guid>
      <dc:creator>jbhappysocks</dc:creator>
      <dc:date>2021-10-19T13:49:16Z</dc:date>
    </item>
    <item>
      <title>Re: Still no VLookup?</title>
      <link>https://community.qlik.com/t5/App-Development/Still-no-VLookup/m-p/1848912#M70156</link>
      <description>&lt;P&gt;Seems like a fairly standard mapping load scenario (though there's multiple other ways to achieve the same thing)&lt;/P&gt;
&lt;P&gt;States:&lt;/P&gt;
&lt;P&gt;Mapping Load * INLINE [&lt;/P&gt;
&lt;P&gt;StateName, Color&lt;/P&gt;
&lt;P&gt;Fresh, Green&lt;/P&gt;
&lt;P&gt;Rotten, Red];&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;LOAD&lt;BR /&gt;Type,&lt;BR /&gt;State,&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;ApplyMap('States',State, 'Blue') as StateColor&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;FROM [lib://FRUIT_MANAGEMENT/FruitMan.xlsx]&lt;BR /&gt;(ooxml, embedded labels, table is "Basket");&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Oct 2021 14:04:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Still-no-VLookup/m-p/1848912#M70156</guid>
      <dc:creator>Or</dc:creator>
      <dc:date>2021-10-19T14:04:40Z</dc:date>
    </item>
    <item>
      <title>Re: Still no VLookup?</title>
      <link>https://community.qlik.com/t5/App-Development/Still-no-VLookup/m-p/1848937#M70159</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;
&lt;P&gt;Thanks! For a table this indeed works but for a single button this doesn't seem to do anything. How do I make it clear to QS that a button should be assigned to 'Apple'?&lt;/P&gt;</description>
      <pubDate>Tue, 19 Oct 2021 14:34:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Still-no-VLookup/m-p/1848937#M70159</guid>
      <dc:creator>TimmyCNHi</dc:creator>
      <dc:date>2021-10-19T14:34:07Z</dc:date>
    </item>
    <item>
      <title>Re: Still no VLookup?</title>
      <link>https://community.qlik.com/t5/App-Development/Still-no-VLookup/m-p/1848952#M70161</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;
&lt;P&gt;I'm a bit lost on this 'mapping'. Why would I need to map something while the table is right there already?&lt;/P&gt;
&lt;P&gt;I do understand that this creates another table linking the current Types and States to a new column named 'StateColor' (which I could also achieve in the Excel table it's linked to) but this also doesn't make it clear to my button that it should behave as an Apple (and thus turn green as it's 'Fresh').&lt;/P&gt;</description>
      <pubDate>Tue, 19 Oct 2021 14:50:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Still-no-VLookup/m-p/1848952#M70161</guid>
      <dc:creator>TimmyCNHi</dc:creator>
      <dc:date>2021-10-19T14:50:50Z</dc:date>
    </item>
    <item>
      <title>Re: Still no VLookup?</title>
      <link>https://community.qlik.com/t5/App-Development/Still-no-VLookup/m-p/1848958#M70164</link>
      <description>&lt;P&gt;Sorry, I must learn to read the whole question, didn't see the part about a button.&lt;/P&gt;
&lt;P&gt;I would go with the mapping suggestion from Or instead then.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Oct 2021 14:54:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Still-no-VLookup/m-p/1848958#M70164</guid>
      <dc:creator>jbhappysocks</dc:creator>
      <dc:date>2021-10-19T14:54:22Z</dc:date>
    </item>
    <item>
      <title>Re: Still no VLookup?</title>
      <link>https://community.qlik.com/t5/App-Development/Still-no-VLookup/m-p/1849239#M70191</link>
      <description>&lt;P&gt;For the same reason you need VLOOKUP (or the significantly-better index/match combination) - you have two tables, and you want to match them based on common values.&lt;/P&gt;
&lt;P&gt;In Qlik, you use mapping loads when you want to look up a value based on an existing field, while also filling in the cases where the value is missing. That's exactly what we have here - you want to fill in a value for color based on the state, and also fill in blue for the missing values. If you didn't have missing values, you could just use a regular JOIN on the state vs. color table to the main table.&lt;/P&gt;</description>
      <pubDate>Wed, 20 Oct 2021 08:02:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Still-no-VLookup/m-p/1849239#M70191</guid>
      <dc:creator>Or</dc:creator>
      <dc:date>2021-10-20T08:02:39Z</dc:date>
    </item>
    <item>
      <title>Re: Still no VLookup?</title>
      <link>https://community.qlik.com/t5/App-Development/Still-no-VLookup/m-p/1849376#M70204</link>
      <description>&lt;P&gt;Yes but I don't want to do this in a table, it needs to be transposed to several separate buttons (or any shapes).&lt;/P&gt;
&lt;P&gt;With this mapping I managed to use an easier way to colour the background of the 'State' column items in a table by setting 'StateColor' as 'Background color expression'.&lt;/P&gt;
&lt;P&gt;I can set the background colour of a button to 'StateColor' but the button doesn't &lt;EM&gt;understand&lt;/EM&gt; what it is. I have the feeling I'm on the right track though! Does its 'Label' need a specific syntax or can filling in a certain syntax in the 'Calculation condition' or 'Enable chart' solve this?&lt;/P&gt;</description>
      <pubDate>Wed, 20 Oct 2021 11:24:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Still-no-VLookup/m-p/1849376#M70204</guid>
      <dc:creator>TimmyCNHi</dc:creator>
      <dc:date>2021-10-20T11:24:27Z</dc:date>
    </item>
    <item>
      <title>Re: Still no VLookup?</title>
      <link>https://community.qlik.com/t5/App-Development/Still-no-VLookup/m-p/1849379#M70205</link>
      <description>&lt;P&gt;I'm not sure what 'understand' would entail in this context. You can use this field to color the button, as you mentioned. You could also use it within formulas for the button or its actions. Could you explain exactly what it is you're trying to achieve?&lt;/P&gt;</description>
      <pubDate>Wed, 20 Oct 2021 11:32:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Still-no-VLookup/m-p/1849379#M70205</guid>
      <dc:creator>Or</dc:creator>
      <dc:date>2021-10-20T11:32:28Z</dc:date>
    </item>
    <item>
      <title>Re: Still no VLookup?</title>
      <link>https://community.qlik.com/t5/App-Development/Still-no-VLookup/m-p/1849420#M70206</link>
      <description>&lt;P&gt;How to set the properties of this button:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="TimmyCNHi_0-1634731852448.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/64826i894D85B131BBF85C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="TimmyCNHi_0-1634731852448.png" alt="TimmyCNHi_0-1634731852448.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="TimmyCNHi_2-1634732122787.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/64828i2718B2BAB7059755/image-size/medium?v=v2&amp;amp;px=400" role="button" title="TimmyCNHi_2-1634732122787.png" alt="TimmyCNHi_2-1634732122787.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;I tried setting 'Background color' as a 'StateColor' expression and a bunch of combinations with 'Label' and 'Enable chart' (also threw Jbhappysocks' solution in there) but it doesn't seem to respond to anything.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="TimmyCNHi_4-1634732511034.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/64830i35B35FE61C7F0255/image-size/medium?v=v2&amp;amp;px=400" role="button" title="TimmyCNHi_4-1634732511034.png" alt="TimmyCNHi_4-1634732511034.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Oct 2021 12:22:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Still-no-VLookup/m-p/1849420#M70206</guid>
      <dc:creator>TimmyCNHi</dc:creator>
      <dc:date>2021-10-20T12:22:05Z</dc:date>
    </item>
    <item>
      <title>Re: Still no VLookup?</title>
      <link>https://community.qlik.com/t5/App-Development/Still-no-VLookup/m-p/1849462#M70207</link>
      <description>&lt;P&gt;Your Button doesn't know that it is an Apple Button, you can't tie a dimension to the object, so it doesn't know what StateColor to use, you'll have to tell it. Try&amp;nbsp;only({&amp;lt;Type = {'Apple'}&amp;gt;} StateColor) instead of just StateColor.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Oct 2021 12:56:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Still-no-VLookup/m-p/1849462#M70207</guid>
      <dc:creator>jbhappysocks</dc:creator>
      <dc:date>2021-10-20T12:56:39Z</dc:date>
    </item>
    <item>
      <title>Re: Still no VLookup?</title>
      <link>https://community.qlik.com/t5/App-Development/Still-no-VLookup/m-p/1849469#M70208</link>
      <description>&lt;P&gt;Yes! That's the one! Thank you, you guys are amazing!&lt;/P&gt;</description>
      <pubDate>Wed, 20 Oct 2021 13:05:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Still-no-VLookup/m-p/1849469#M70208</guid>
      <dc:creator>TimmyCNHi</dc:creator>
      <dc:date>2021-10-20T13:05:10Z</dc:date>
    </item>
  </channel>
</rss>

