<?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: The best practice to change/replace in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/The-best-practice-to-change-replace/m-p/1063708#M355810</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am still thinking about this situation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let's say my case is little bit different. I need to change Sale Y to X if Domain is B and C. Would it be the same solution IF statement?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 06 Feb 2016 17:17:47 GMT</pubDate>
    <dc:creator>MindaugasBacius</dc:creator>
    <dc:date>2016-02-06T17:17:47Z</dc:date>
    <item>
      <title>The best practice to change/replace</title>
      <link>https://community.qlik.com/t5/QlikView/The-best-practice-to-change-replace/m-p/1063704#M355806</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hei,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="xml" __jive_macro_name="code" class="jive_macro_code jive_text_macro _jivemacro_uid_14547761101596380" jivemacro_uid="_14547761101596380" modifiedtitle="true"&gt;
&lt;P&gt;LOAD * INLINE [&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Domain, Sale&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; A, D&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; A, G&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; B, Y&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; B, H&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; C, Y&lt;/P&gt;
&lt;P&gt;];&lt;/P&gt;

&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I would like to change Y to X in case Domain is C, what would be the script?&lt;/P&gt;&lt;P&gt;That is the best practice knowing that the database is huge.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 06 Feb 2016 16:30:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/The-best-practice-to-change-replace/m-p/1063704#M355806</guid>
      <dc:creator>MindaugasBacius</dc:creator>
      <dc:date>2016-02-06T16:30:54Z</dc:date>
    </item>
    <item>
      <title>Re: The best practice to change/replace</title>
      <link>https://community.qlik.com/t5/QlikView/The-best-practice-to-change-replace/m-p/1063705#M355807</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If it is just 1 value you want to change and the actual load is not an InLine table, use an If statement like this:&lt;/P&gt;&lt;P&gt;if(Domain = 'C', 'X', Scale) as Scale,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you have a lot of conversions, create mapping table and do it via an applyMap()&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 06 Feb 2016 16:43:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/The-best-practice-to-change-replace/m-p/1063705#M355807</guid>
      <dc:creator>oknotsen</dc:creator>
      <dc:date>2016-02-06T16:43:32Z</dc:date>
    </item>
    <item>
      <title>Re: The best practice to change/replace</title>
      <link>https://community.qlik.com/t5/QlikView/The-best-practice-to-change-replace/m-p/1063706#M355808</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you have only this single case an if-loop with: if(Domain = 'C' and Sale = 'Y', 'X', Sale) as Sale. Are there more (complex) cases pick(match()) or a mapping are easier to handle and more performant.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 06 Feb 2016 16:45:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/The-best-practice-to-change-replace/m-p/1063706#M355808</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2016-02-06T16:45:55Z</dc:date>
    </item>
    <item>
      <title>Re: The best practice to change/replace</title>
      <link>https://community.qlik.com/t5/QlikView/The-best-practice-to-change-replace/m-p/1063707#M355809</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You are right. I do need to replace the Sale value only when Domain is C. It's a single case.&lt;/P&gt;&lt;P&gt;I wasn't sure if IF clause is the most efficient way to do that. But if pros are saying so &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 06 Feb 2016 16:54:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/The-best-practice-to-change-replace/m-p/1063707#M355809</guid>
      <dc:creator>MindaugasBacius</dc:creator>
      <dc:date>2016-02-06T16:54:35Z</dc:date>
    </item>
    <item>
      <title>Re: The best practice to change/replace</title>
      <link>https://community.qlik.com/t5/QlikView/The-best-practice-to-change-replace/m-p/1063708#M355810</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am still thinking about this situation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let's say my case is little bit different. I need to change Sale Y to X if Domain is B and C. Would it be the same solution IF statement?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 06 Feb 2016 17:17:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/The-best-practice-to-change-replace/m-p/1063708#M355810</guid>
      <dc:creator>MindaugasBacius</dc:creator>
      <dc:date>2016-02-06T17:17:47Z</dc:date>
    </item>
    <item>
      <title>Re: The best practice to change/replace</title>
      <link>https://community.qlik.com/t5/QlikView/The-best-practice-to-change-replace/m-p/1063709#M355811</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Even with this I would use a small if-statement and only if I experience serious performance-issues I would check if another method is more performant. You could try (enable logging for this) various approaches like a mapping or the if-loop but I doubt that you will see significantely differences even with larger datasets.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you fetched the data from a database and transformed them within a preceeding load it's more unlikely to see differences between the bottleneck is rather the database respectively the network.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 06 Feb 2016 17:40:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/The-best-practice-to-change-replace/m-p/1063709#M355811</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2016-02-06T17:40:01Z</dc:date>
    </item>
  </channel>
</rss>

