<?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 Replacing characters in a string in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Replacing-characters-in-a-string/m-p/317614#M117112</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have sequence column with the following values : 3,1,1,0,4&lt;/P&gt;&lt;P&gt;I like to replace the numbers with characters&lt;/P&gt;&lt;P&gt;0=A&lt;/P&gt;&lt;P&gt;1=B&lt;/P&gt;&lt;P&gt;3=C &lt;/P&gt;&lt;P&gt;4=d&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I manage to replace 1 character using the “replace”, but I didnot manage to replace the entire string with the information that I needed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I will appreciate your help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;T.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 14 Nov 2011 13:41:35 GMT</pubDate>
    <dc:creator />
    <dc:date>2011-11-14T13:41:35Z</dc:date>
    <item>
      <title>Replacing characters in a string</title>
      <link>https://community.qlik.com/t5/QlikView/Replacing-characters-in-a-string/m-p/317614#M117112</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have sequence column with the following values : 3,1,1,0,4&lt;/P&gt;&lt;P&gt;I like to replace the numbers with characters&lt;/P&gt;&lt;P&gt;0=A&lt;/P&gt;&lt;P&gt;1=B&lt;/P&gt;&lt;P&gt;3=C &lt;/P&gt;&lt;P&gt;4=d&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I manage to replace 1 character using the “replace”, but I didnot manage to replace the entire string with the information that I needed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I will appreciate your help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;T.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Nov 2011 13:41:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Replacing-characters-in-a-string/m-p/317614#M117112</guid>
      <dc:creator />
      <dc:date>2011-11-14T13:41:35Z</dc:date>
    </item>
    <item>
      <title>Replacing characters in a string</title>
      <link>https://community.qlik.com/t5/QlikView/Replacing-characters-in-a-string/m-p/317615#M117113</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi tkalimi. Depends on what the field contains exactly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Would values in that field only contain just one number as the whole value? EG&lt;/P&gt;&lt;P&gt;ID,Custom_Field&lt;/P&gt;&lt;P&gt;1, 3&lt;/P&gt;&lt;P&gt;2, 1&lt;/P&gt;&lt;P&gt;3, 1&lt;/P&gt;&lt;P&gt;4, 0&lt;/P&gt;&lt;P&gt;5, 4&lt;/P&gt;&lt;P&gt;If so, you could create a mapping table that maps those numbers to the letters specified. Alternately you could use a formula on the character number to change it to those numbers.The function to return the ascii number is Ord(). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EG load ID, ord(Custom_Field) - 64 as new_field.....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ie ord('A') - 64 = 65-64 = 1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If your string is more complex than that, eg a series of concatenated numbers 31_4 or something like that you could use nested replace() functions&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EG load ID, &lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;replace&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;replace&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;('custom_field','1','A'),'2','B')&amp;nbsp; as new_field...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Which one do you mean?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Erica.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Nov 2011 14:10:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Replacing-characters-in-a-string/m-p/317615#M117113</guid>
      <dc:creator />
      <dc:date>2011-11-14T14:10:36Z</dc:date>
    </item>
    <item>
      <title>Re: Replacing characters in a string</title>
      <link>https://community.qlik.com/t5/QlikView/Replacing-characters-in-a-string/m-p/317616#M117114</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks a lot,&lt;/P&gt;&lt;P&gt;I use the concatenated replace option.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;T.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Nov 2011 14:24:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Replacing-characters-in-a-string/m-p/317616#M117114</guid>
      <dc:creator />
      <dc:date>2011-11-14T14:24:15Z</dc:date>
    </item>
    <item>
      <title>Replacing characters in a string</title>
      <link>https://community.qlik.com/t5/QlikView/Replacing-characters-in-a-string/m-p/317617#M117115</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; You're welcome! &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards, Erica&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Nov 2011 14:34:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Replacing-characters-in-a-string/m-p/317617#M117115</guid>
      <dc:creator />
      <dc:date>2011-11-14T14:34:29Z</dc:date>
    </item>
  </channel>
</rss>

