<?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: When value is 259 search in excel file in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/When-value-is-259-search-in-excel-file/m-p/1990154#M81872</link>
    <description>&lt;P&gt;That's because you are using Itemgroup, paste the line as i posted in the first answer :&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;If(FK_ITEMGROUP=259,Applymap('maptable',CODE),"FK_ITEMGROUP") as Itemgroupid&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Only Change maptable to the mapping table name:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;If(FK_ITEMGROUP=259,Applymap('Categorized',CODE),"FK_ITEMGROUP") as Itemgroupid&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;also i said that...That line should go in the Item table,&lt;STRONG&gt; instead of loading Itemgroupid as it's loading now use that line.&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;... the exel hast the group name or the id? If it has the name you'll need some extra treatment.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;1. Load Item as it was initially and do a left join of the ITemgroup table to have itemgroup in the same table:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;2. do a load of this table loading Itemid, itemcode and itemgroup with the check and applymap:&lt;/SPAN&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;tmpItem:
// Load as Item was created initally
;
Left Join (tmpItem)
LOAD // Itemgroup table as it was initially loaded
;
Item:
NoConcatenate
LOAD
  Itemid,
  Itemcode
  If(Itemgroupid=259,Applymap('maptable',itemcode),Itemgroup) as Itemgroup
Resident tmpItem;
DROP Table tmpItem&lt;/LI-CODE&gt;</description>
    <pubDate>Fri, 07 Oct 2022 13:00:21 GMT</pubDate>
    <dc:creator>rubenmarin</dc:creator>
    <dc:date>2022-10-07T13:00:21Z</dc:date>
    <item>
      <title>When value is 259 search in excel file</title>
      <link>https://community.qlik.com/t5/App-Development/When-value-is-259-search-in-excel-file/m-p/1990038#M81857</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am working with a live database, in this database there is information about items and in which itemgroup they are. Old/unused&amp;nbsp; items are grouped in a group called "yet to be determend". Unfortunatly because of reasons I will not get into these items will never be categorized in the database.&lt;/P&gt;
&lt;P&gt;To make a proper analysis I still categorized them in an external Excel file.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Now I need the following solution:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When Itemgroupid=259 search In excel file for Itemcode and lookup Itemgroup.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I made a simple script with the data I am using.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Simon4_0-1665135852625.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/90803iC10E26175E4F6AE6/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Simon4_0-1665135852625.png" alt="Simon4_0-1665135852625.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;How do I approach this problem?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you kindly in advance,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Simon&lt;/P&gt;</description>
      <pubDate>Fri, 07 Oct 2022 09:46:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/When-value-is-259-search-in-excel-file/m-p/1990038#M81857</guid>
      <dc:creator>Simon4</dc:creator>
      <dc:date>2022-10-07T09:46:37Z</dc:date>
    </item>
    <item>
      <title>Re: When value is 259 search in excel file</title>
      <link>https://community.qlik.com/t5/App-Development/When-value-is-259-search-in-excel-file/m-p/1990059#M81858</link>
      <description>&lt;P&gt;Hi, you can load the excel a mapping table, and while loading items use an applymap:&lt;/P&gt;
&lt;P&gt;If(FK_ITEMGROUP=259,Applymap('maptable',CODE),"FK_ITEMGROUP") as Itemgroupid&lt;/P&gt;</description>
      <pubDate>Fri, 07 Oct 2022 10:21:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/When-value-is-259-search-in-excel-file/m-p/1990059#M81858</guid>
      <dc:creator>rubenmarin</dc:creator>
      <dc:date>2022-10-07T10:21:27Z</dc:date>
    </item>
    <item>
      <title>Re: When value is 259 search in excel file</title>
      <link>https://community.qlik.com/t5/App-Development/When-value-is-259-search-in-excel-file/m-p/1990073#M81859</link>
      <description>&lt;P&gt;Thankyou for your repply.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am not sure if I understand correctly. This should be it right? Why am I getting the red text?&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Simon4_1-1665140271028.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/90818iF89D6A7C2DF2F235/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Simon4_1-1665140271028.png" alt="Simon4_1-1665140271028.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 07 Oct 2022 10:58:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/When-value-is-259-search-in-excel-file/m-p/1990073#M81859</guid>
      <dc:creator>Simon4</dc:creator>
      <dc:date>2022-10-07T10:58:31Z</dc:date>
    </item>
    <item>
      <title>Re: When value is 259 search in excel file</title>
      <link>https://community.qlik.com/t5/App-Development/When-value-is-259-search-in-excel-file/m-p/1990074#M81860</link>
      <description>&lt;P&gt;That line should go in the Item table, instead of loading Itemgroupid as it's loading now use that line.&lt;/P&gt;
&lt;P&gt;The mapping table should be created before the item table so it's available for applymap.&lt;/P&gt;
&lt;P&gt;And the applymap should search for CODE, as the field Itemcode is not yet created when loading the item table.&lt;/P&gt;</description>
      <pubDate>Fri, 07 Oct 2022 11:01:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/When-value-is-259-search-in-excel-file/m-p/1990074#M81860</guid>
      <dc:creator>rubenmarin</dc:creator>
      <dc:date>2022-10-07T11:01:46Z</dc:date>
    </item>
    <item>
      <title>Re: When value is 259 search in excel file</title>
      <link>https://community.qlik.com/t5/App-Development/When-value-is-259-search-in-excel-file/m-p/1990106#M81862</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am still having trouble getting it running. What do I have to change?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Simon4_0-1665144765857.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/90823iC7DF80D90494DF47/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Simon4_0-1665144765857.png" alt="Simon4_0-1665144765857.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;To clarify, I changed the Excel table.&lt;/P&gt;
&lt;P&gt;Thank you for taking your time to respond! You are helping me a lot, know it is appreciated.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Simon&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 07 Oct 2022 12:14:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/When-value-is-259-search-in-excel-file/m-p/1990106#M81862</guid>
      <dc:creator>Simon4</dc:creator>
      <dc:date>2022-10-07T12:14:37Z</dc:date>
    </item>
    <item>
      <title>Re: When value is 259 search in excel file</title>
      <link>https://community.qlik.com/t5/App-Development/When-value-is-259-search-in-excel-file/m-p/1990112#M81863</link>
      <description>&lt;P&gt;Hi, the ITEMGROUP table needs the 'as' to rename the fields.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="rubenmarin_0-1665145541151.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/90825i49B91199DF91D7F9/image-size/medium?v=v2&amp;amp;px=400" role="button" title="rubenmarin_0-1665145541151.png" alt="rubenmarin_0-1665145541151.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;If doesn't works it will be easier for me if you add additional info like the error you get or post the results you have and the ones you expect.&lt;/P&gt;</description>
      <pubDate>Fri, 07 Oct 2022 12:26:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/When-value-is-259-search-in-excel-file/m-p/1990112#M81863</guid>
      <dc:creator>rubenmarin</dc:creator>
      <dc:date>2022-10-07T12:26:47Z</dc:date>
    </item>
    <item>
      <title>Re: When value is 259 search in excel file</title>
      <link>https://community.qlik.com/t5/App-Development/When-value-is-259-search-in-excel-file/m-p/1990132#M81868</link>
      <description>&lt;P&gt;It doesn't work.&lt;/P&gt;
&lt;P&gt;When I load this code:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Simon4_0-1665146317107.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/90826i26534DD4CC25939F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Simon4_0-1665146317107.png" alt="Simon4_0-1665146317107.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;I get this error message:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Simon4_1-1665146358884.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/90827i16740DA352934299/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Simon4_1-1665146358884.png" alt="Simon4_1-1665146358884.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;I'll try to explain what I expect a little bit better than I did before:&lt;/P&gt;
&lt;P&gt;When Itemgroupid=259 I need Qlik to look at the excel file what the actual itemgroupid is and overwrite the itemgroupid from table Item (so the 259). This way it can lookup the Itemgroup in table "Itemgroup" and make the data complete.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Maybe it is a possibility to join the excel file with the table "Item" and overwrite the itemgroupid? I looked in to this but could not find a solution.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 07 Oct 2022 12:44:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/When-value-is-259-search-in-excel-file/m-p/1990132#M81868</guid>
      <dc:creator>Simon4</dc:creator>
      <dc:date>2022-10-07T12:44:05Z</dc:date>
    </item>
    <item>
      <title>Re: When value is 259 search in excel file</title>
      <link>https://community.qlik.com/t5/App-Development/When-value-is-259-search-in-excel-file/m-p/1990154#M81872</link>
      <description>&lt;P&gt;That's because you are using Itemgroup, paste the line as i posted in the first answer :&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;If(FK_ITEMGROUP=259,Applymap('maptable',CODE),"FK_ITEMGROUP") as Itemgroupid&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Only Change maptable to the mapping table name:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;If(FK_ITEMGROUP=259,Applymap('Categorized',CODE),"FK_ITEMGROUP") as Itemgroupid&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;also i said that...That line should go in the Item table,&lt;STRONG&gt; instead of loading Itemgroupid as it's loading now use that line.&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;... the exel hast the group name or the id? If it has the name you'll need some extra treatment.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;1. Load Item as it was initially and do a left join of the ITemgroup table to have itemgroup in the same table:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;2. do a load of this table loading Itemid, itemcode and itemgroup with the check and applymap:&lt;/SPAN&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;tmpItem:
// Load as Item was created initally
;
Left Join (tmpItem)
LOAD // Itemgroup table as it was initially loaded
;
Item:
NoConcatenate
LOAD
  Itemid,
  Itemcode
  If(Itemgroupid=259,Applymap('maptable',itemcode),Itemgroup) as Itemgroup
Resident tmpItem;
DROP Table tmpItem&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 07 Oct 2022 13:00:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/When-value-is-259-search-in-excel-file/m-p/1990154#M81872</guid>
      <dc:creator>rubenmarin</dc:creator>
      <dc:date>2022-10-07T13:00:21Z</dc:date>
    </item>
    <item>
      <title>Re: When value is 259 search in excel file</title>
      <link>https://community.qlik.com/t5/App-Development/When-value-is-259-search-in-excel-file/m-p/1990206#M81876</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Simon4_2-1665149881552.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/90857i6DA666E2FCA4D756/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Simon4_2-1665149881552.png" alt="Simon4_2-1665149881552.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;No errors in this code!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But it is still not quite right.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;this is the result whitout&amp;nbsp;&lt;/P&gt;
&lt;PRE class="lia-code-sample  language-markup"&gt;&lt;CODE&gt;Item:
NoConcatenate
LOAD
  Itemid,
  Itemcode
  If(Itemgroupid=259,Applymap('maptable',itemcode),Itemgroup) as Itemgroup
Resident tmpItem;
DROP Table tmpItem&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;The blue category is the itemgroupid "259"&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Simon4_4-1665150020037.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/90862iC4DA0B5BA30F3066/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Simon4_4-1665150020037.png" alt="Simon4_4-1665150020037.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;And this is the full code.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Simon4_3-1665150007893.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/90861iA939998A199EC728/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Simon4_3-1665150007893.png" alt="Simon4_3-1665150007893.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It looks to me that everything in the category 259 just switched to "Other".&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 07 Oct 2022 13:43:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/When-value-is-259-search-in-excel-file/m-p/1990206#M81876</guid>
      <dc:creator>Simon4</dc:creator>
      <dc:date>2022-10-07T13:43:33Z</dc:date>
    </item>
    <item>
      <title>Re: When value is 259 search in excel file</title>
      <link>https://community.qlik.com/t5/App-Development/When-value-is-259-search-in-excel-file/m-p/1990219#M81878</link>
      <description>&lt;P&gt;I checked the insights.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It now loads every Itemcode with Itemgroupcode "259" as a category. Every item has become its own category.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 07 Oct 2022 13:55:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/When-value-is-259-search-in-excel-file/m-p/1990219#M81878</guid>
      <dc:creator>Simon4</dc:creator>
      <dc:date>2022-10-07T13:55:23Z</dc:date>
    </item>
    <item>
      <title>Re: When value is 259 search in excel file</title>
      <link>https://community.qlik.com/t5/App-Development/When-value-is-259-search-in-excel-file/m-p/1991083#M81980</link>
      <description>&lt;P&gt;That 'other' it's a configuration in the pie chart, you can disable to show that.&lt;/P&gt;
&lt;P&gt;To check data it will be better to do in a table chart.&lt;/P&gt;</description>
      <pubDate>Tue, 11 Oct 2022 06:23:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/When-value-is-259-search-in-excel-file/m-p/1991083#M81980</guid>
      <dc:creator>rubenmarin</dc:creator>
      <dc:date>2022-10-11T06:23:40Z</dc:date>
    </item>
    <item>
      <title>Re: When value is 259 search in excel file</title>
      <link>https://community.qlik.com/t5/App-Development/When-value-is-259-search-in-excel-file/m-p/1991087#M81982</link>
      <description>&lt;P&gt;That would happen if the values of the Applymap() are not found in the mapping table, check wich values the excel have and in Appplyap use the field that matches those values from the database.&lt;/P&gt;</description>
      <pubDate>Tue, 11 Oct 2022 06:26:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/When-value-is-259-search-in-excel-file/m-p/1991087#M81982</guid>
      <dc:creator>rubenmarin</dc:creator>
      <dc:date>2022-10-11T06:26:35Z</dc:date>
    </item>
    <item>
      <title>Re: When value is 259 search in excel file</title>
      <link>https://community.qlik.com/t5/App-Development/When-value-is-259-search-in-excel-file/m-p/1991088#M81983</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/22593"&gt;@rubenmarin&lt;/a&gt; ,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you for all you time and patience.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;After a lot of trying I have made it work. Could not have done it whitout your help.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks lots,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SV&lt;/P&gt;</description>
      <pubDate>Tue, 11 Oct 2022 06:27:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/When-value-is-259-search-in-excel-file/m-p/1991088#M81983</guid>
      <dc:creator>Simon4</dc:creator>
      <dc:date>2022-10-11T06:27:05Z</dc:date>
    </item>
  </channel>
</rss>

