<?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 would you replace a value with a new? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/How-would-you-replace-a-value-with-a-new/m-p/1659796#M729013</link>
    <description>&lt;P&gt;Ah, sorry, I should have explained further.&lt;/P&gt;&lt;P&gt;The products come from a different source.&lt;/P&gt;&lt;P&gt;Products have names like&amp;nbsp;&lt;/P&gt;&lt;P&gt;ABC-50&lt;/P&gt;&lt;P&gt;ABC-251&lt;/P&gt;&lt;P&gt;BG-100-100&lt;/P&gt;&lt;P&gt;etc.&lt;/P&gt;&lt;P&gt;The general price list is matched with the uppercase letters, so all ABC products have the same price and all the BG have the same price.&lt;/P&gt;&lt;P&gt;The general pricelist is the excel file with the uppercase letters as "productpricelist" and then price column.&lt;/P&gt;&lt;P&gt;The "special" price list is presented with the full unique product name ex ABC-222 but does not have the same price as the ABC general prices.&lt;/P&gt;&lt;P&gt;There is no customer ID in either list. Just the uppercase "Productpricelist" in the general one and the full product name in the special one.&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>Fri, 20 Dec 2019 14:26:33 GMT</pubDate>
    <dc:creator>Meg00</dc:creator>
    <dc:date>2019-12-20T14:26:33Z</dc:date>
    <item>
      <title>How would you replace a value with a new?</title>
      <link>https://community.qlik.com/t5/QlikView/How-would-you-replace-a-value-with-a-new/m-p/1659653#M729009</link>
      <description>&lt;P&gt;Hi experts!&lt;/P&gt;&lt;P&gt;I have a problem that I would like to share and maybe hear your suggested sollutions!&lt;/P&gt;&lt;P&gt;I have 2 excel files with prices of products. One is a general list and the other is for clients that has a diffrent price from that general list.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to keep the general price for every client that does not appear in the second list.&lt;/P&gt;&lt;P&gt;Scriptwise, how do I make sure that the clients that appear in the secont list gets the right price?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Explaining further,&lt;/P&gt;&lt;P&gt;My existing table with general prices can not be altered.&lt;/P&gt;&lt;P&gt;What I want to do is to "overwrite" the price only for the product IDs that exist in the "new" list of prices.&amp;nbsp;&lt;/P&gt;&lt;P&gt;So the new list consists of Product ID and the price whilst the general consists of many more fields per product ID row.I only want to alter the price field:&lt;/P&gt;&lt;P&gt;General prices table: (has every ProductID and their general price)&amp;nbsp;&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;ProductID&lt;/TD&gt;&lt;TD&gt;Price&lt;/TD&gt;&lt;TD&gt;Field3&lt;/TD&gt;&lt;TD&gt;Field4&lt;/TD&gt;&lt;TD&gt;Field5&lt;/TD&gt;&lt;TD&gt;Etc..&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Other prices excel:(has only a handfull rows with Products that have a new temporary price, only a few IDs from the general list exists here)&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;ProductID&lt;/TD&gt;&lt;TD&gt;Price&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-would-you-replace-a-value-with-a-new/m-p/1659653#M729009</guid>
      <dc:creator>Meg00</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: How would you replace a value with a new?</title>
      <link>https://community.qlik.com/t5/QlikView/How-would-you-replace-a-value-with-a-new/m-p/1659659#M729010</link>
      <description>&lt;P&gt;Check If that helps&amp;nbsp;&lt;A href="https://help.qlik.com/en-US/qlikview/April2019/Subsystems/Client/Content/QV_QlikView/Scripting/InterRecordFunctions/Exists.htm" target="_blank"&gt;Exists in Qlik&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 20 Dec 2019 08:56:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-would-you-replace-a-value-with-a-new/m-p/1659659#M729010</guid>
      <dc:creator>Anil_Babu_Samineni</dc:creator>
      <dc:date>2019-12-20T08:56:26Z</dc:date>
    </item>
    <item>
      <title>Re: How would you replace a value with a new?</title>
      <link>https://community.qlik.com/t5/QlikView/How-would-you-replace-a-value-with-a-new/m-p/1659676#M729011</link>
      <description>&lt;P&gt;sample data with expected output will help better to get faster reply?&lt;/P&gt;</description>
      <pubDate>Fri, 20 Dec 2019 09:55:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-would-you-replace-a-value-with-a-new/m-p/1659676#M729011</guid>
      <dc:creator>Kushal_Chawda</dc:creator>
      <dc:date>2019-12-20T09:55:13Z</dc:date>
    </item>
    <item>
      <title>Re: How would you replace a value with a new?</title>
      <link>https://community.qlik.com/t5/QlikView/How-would-you-replace-a-value-with-a-new/m-p/1659686#M729012</link>
      <description>&lt;P&gt;Just join both lists with different Value names&lt;/P&gt;&lt;P&gt;for example:&lt;/P&gt;&lt;P&gt;[Table 1]:&lt;/P&gt;&lt;P&gt;Customer_ID,[General Value]&lt;/P&gt;&lt;P&gt;123,100&lt;/P&gt;&lt;P&gt;[Table 2]:&lt;/P&gt;&lt;P&gt;Customer_ID,[Customer Value]&lt;/P&gt;&lt;P&gt;123,70&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Once joined you form a new Value Dimension which says:&lt;/P&gt;&lt;P&gt;if(isnull([Customer Value]),[General Value],[Customer Value]) as [New Value]&lt;/P&gt;&lt;P&gt;Then you got a list of all customers with either customer based values and if not given the general Values&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Greetings&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 20 Dec 2019 10:26:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-would-you-replace-a-value-with-a-new/m-p/1659686#M729012</guid>
      <dc:creator>H_Julian</dc:creator>
      <dc:date>2019-12-20T10:26:13Z</dc:date>
    </item>
    <item>
      <title>Re: How would you replace a value with a new?</title>
      <link>https://community.qlik.com/t5/QlikView/How-would-you-replace-a-value-with-a-new/m-p/1659796#M729013</link>
      <description>&lt;P&gt;Ah, sorry, I should have explained further.&lt;/P&gt;&lt;P&gt;The products come from a different source.&lt;/P&gt;&lt;P&gt;Products have names like&amp;nbsp;&lt;/P&gt;&lt;P&gt;ABC-50&lt;/P&gt;&lt;P&gt;ABC-251&lt;/P&gt;&lt;P&gt;BG-100-100&lt;/P&gt;&lt;P&gt;etc.&lt;/P&gt;&lt;P&gt;The general price list is matched with the uppercase letters, so all ABC products have the same price and all the BG have the same price.&lt;/P&gt;&lt;P&gt;The general pricelist is the excel file with the uppercase letters as "productpricelist" and then price column.&lt;/P&gt;&lt;P&gt;The "special" price list is presented with the full unique product name ex ABC-222 but does not have the same price as the ABC general prices.&lt;/P&gt;&lt;P&gt;There is no customer ID in either list. Just the uppercase "Productpricelist" in the general one and the full product name in the special one.&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>Fri, 20 Dec 2019 14:26:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-would-you-replace-a-value-with-a-new/m-p/1659796#M729013</guid>
      <dc:creator>Meg00</dc:creator>
      <dc:date>2019-12-20T14:26:33Z</dc:date>
    </item>
    <item>
      <title>Re: How would you replace a value with a new?</title>
      <link>https://community.qlik.com/t5/QlikView/How-would-you-replace-a-value-with-a-new/m-p/1659969#M729014</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;You can concatenate the two price lists to make one single table. Load the table using Mapping Load.&lt;/P&gt;&lt;P&gt;and then ApplyMap to you existing table. I've shared my code below. Hope this helps.&lt;/P&gt;&lt;P&gt;MAP_TABLE:&lt;/P&gt;&lt;P&gt;MAPPING LOAD * INLINE [&lt;BR /&gt;PRODUCT, PRICE&lt;BR /&gt;AA, 1000&lt;BR /&gt;ABC, 2000&lt;BR /&gt;AA-123, 4000&lt;BR /&gt;];&lt;/P&gt;&lt;P&gt;---------------AA and ABC is my general price&lt;/P&gt;&lt;P&gt;-----------------AA-123 is my special price&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;TEST_TABLE:&lt;/P&gt;&lt;P&gt;LOAD * INLINE [&lt;BR /&gt;PRODUCT, QUANTITY&lt;BR /&gt;AA-123, 100&lt;BR /&gt;AA-34-ABC, 200&lt;BR /&gt;ABC-111 - 30&lt;BR /&gt;];&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;FINAL_TABLE:&lt;/P&gt;&lt;P&gt;LOAD&lt;BR /&gt;PRODUCT,&lt;BR /&gt;APPLYMAP('MAP_TABLE',PRODUCT, APPLYMAP('MAP_TABLE', SubField(PRODUCT, '-',1))) AS&amp;nbsp; VALUE,&lt;BR /&gt;QUANTITY&lt;BR /&gt;Resident TEST_TABLE;&lt;/P&gt;&lt;P&gt;DROP Table TEST_TABLE;&lt;/P&gt;&lt;P&gt;-------- My ApplyMap will get values for special price first. If I don't have a corresponding special price the ELSE part in the ApplyMap will be executed (which is my general price)&lt;/P&gt;</description>
      <pubDate>Sun, 22 Dec 2019 11:18:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-would-you-replace-a-value-with-a-new/m-p/1659969#M729014</guid>
      <dc:creator>siddheshmane</dc:creator>
      <dc:date>2019-12-22T11:18:07Z</dc:date>
    </item>
    <item>
      <title>Re: How would you replace a value with a new?</title>
      <link>https://community.qlik.com/t5/QlikView/How-would-you-replace-a-value-with-a-new/m-p/1661350#M729015</link>
      <description>&lt;P&gt;Tried to explan further in post. I simply want to change the price field only for the Product IDs that exist in the new price excel file.&lt;/P&gt;</description>
      <pubDate>Mon, 30 Dec 2019 09:08:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-would-you-replace-a-value-with-a-new/m-p/1661350#M729015</guid>
      <dc:creator>Meg00</dc:creator>
      <dc:date>2019-12-30T09:08:24Z</dc:date>
    </item>
    <item>
      <title>Re: How would you replace a value with a new?</title>
      <link>https://community.qlik.com/t5/QlikView/How-would-you-replace-a-value-with-a-new/m-p/1661420#M729016</link>
      <description>&lt;P&gt;I would just add another applymap() in the else part of the main applymap() where you get your general prices.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'll have two mapping tables one with general prices and the other with the special prices.&lt;/P&gt;&lt;P&gt;If i get the values in special price then ill applymap() the special prices table, else i'll use the general prices table.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could you please share a sample data.&lt;/P&gt;</description>
      <pubDate>Mon, 30 Dec 2019 11:01:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-would-you-replace-a-value-with-a-new/m-p/1661420#M729016</guid>
      <dc:creator>siddheshmane</dc:creator>
      <dc:date>2019-12-30T11:01:47Z</dc:date>
    </item>
    <item>
      <title>Re: How would you replace a value with a new?</title>
      <link>https://community.qlik.com/t5/QlikView/How-would-you-replace-a-value-with-a-new/m-p/1661426#M729017</link>
      <description>&lt;P&gt;Sorry, I can not provide sample data. the steps leading up to the general prices table are many and I do not want to change that part of the script. Only wish to replace prices if the ID exists in the new prices excel.&lt;/P&gt;</description>
      <pubDate>Mon, 30 Dec 2019 11:13:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-would-you-replace-a-value-with-a-new/m-p/1661426#M729017</guid>
      <dc:creator>Meg00</dc:creator>
      <dc:date>2019-12-30T11:13:49Z</dc:date>
    </item>
  </channel>
</rss>

