<?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: REPLACE function in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/REPLACE-function/m-p/412495#M701688</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm pretty sure this can be done in a nicer way but it's almost 7pm so here goes:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=replace(left('ABC-12345-12345',index('ABC-12345-12345','-')),'-','*')&amp;amp;right('ABC-12345-12345',len('ABC-12345-12345')-index('ABC-12345-12345','-'))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just replace the 'ABC-12345-12345' with your field name and it should be ok.&lt;/P&gt;&lt;P&gt;What it does is basically to take the first section up until the first dash '-' and replaces the dash with a star '*'. Then it concatenates on the part on the right up until the first dash (which is now a star) by calculating the length of the string and subtracting the distance from the start until the first dash (star).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 17 Sep 2012 10:50:17 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2012-09-17T10:50:17Z</dc:date>
    <item>
      <title>REPLACE function</title>
      <link>https://community.qlik.com/t5/QlikView/REPLACE-function/m-p/412493#M701686</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I was wondering if it would be possible to do the following in QV:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a field which contains a series of letters: e.g. ABC-12345-12345&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to find the first "-" and replace it with a "*" - e.g. ABC*12345-12345&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The first part (e.g. ABC) is variable in length.&amp;nbsp; I'm trying to use the Subfield and Replace functions and I can't seem to get this to work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help would be greatly appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!! &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Sep 2012 10:34:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/REPLACE-function/m-p/412493#M701686</guid>
      <dc:creator />
      <dc:date>2012-09-17T10:34:31Z</dc:date>
    </item>
    <item>
      <title>Re: REPLACE function</title>
      <link>https://community.qlik.com/t5/QlikView/REPLACE-function/m-p/412494#M701687</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_13478785512602345" jivemacro_uid="_13478785512602345"&gt;&lt;P&gt;=Left('ABC-12345-12345', Index('ABC-12345-12345', '-') -1) &amp;amp; '*' &amp;amp; Mid('ABC-12345-12345', Index('ABC-12345-12345', '-') +1)&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Miguel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Sep 2012 10:43:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/REPLACE-function/m-p/412494#M701687</guid>
      <dc:creator>Miguel_Angel_Baeyens</dc:creator>
      <dc:date>2012-09-17T10:43:32Z</dc:date>
    </item>
    <item>
      <title>Re: REPLACE function</title>
      <link>https://community.qlik.com/t5/QlikView/REPLACE-function/m-p/412495#M701688</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm pretty sure this can be done in a nicer way but it's almost 7pm so here goes:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=replace(left('ABC-12345-12345',index('ABC-12345-12345','-')),'-','*')&amp;amp;right('ABC-12345-12345',len('ABC-12345-12345')-index('ABC-12345-12345','-'))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just replace the 'ABC-12345-12345' with your field name and it should be ok.&lt;/P&gt;&lt;P&gt;What it does is basically to take the first section up until the first dash '-' and replaces the dash with a star '*'. Then it concatenates on the part on the right up until the first dash (which is now a star) by calculating the length of the string and subtracting the distance from the start until the first dash (star).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Sep 2012 10:50:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/REPLACE-function/m-p/412495#M701688</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-09-17T10:50:17Z</dc:date>
    </item>
  </channel>
</rss>

