<?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: STRING FUNCTION in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/STRING-FUNCTION/m-p/611011#M1104680</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In that case, your best bet is to create a variable called &lt;STRONG&gt;vReverse&lt;/STRONG&gt; and populate it with this code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;='mid($1, len($1) - 0, 1) &amp;amp; mid($1, len($1) - 1, 1) &amp;amp; mid($1, len($1) - 2, 1) &amp;amp; mid($1, len($1) - 3, 1) &amp;amp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; mid($1, len($1) - 4, 1) &amp;amp; mid($1, len($1) - 5, 1) &amp;amp; mid($1, len($1) - 6, 1) &amp;amp; mid($1, len($1) - 7, 1) &amp;amp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; mid($1, len($1) - 8, 1) &amp;amp; mid($1, len($1) - 9, 1) &amp;amp; mid($1, len($1) - 10, 1) &amp;amp; mid($1, len($1) - 11, 1) &amp;amp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; mid($1, len($1) - 12, 1) &amp;amp; mid($1, len($1) - 13, 1) &amp;amp; mid($1, len($1) - 14, 1) &amp;amp; mid($1, len($1) - 15, 1)'&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can then call a Calculated Dimension in your Pivot with the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;=$(vReverse(MyField))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It would be better to reverse the field in the load script and have two versions of the field.&amp;nbsp; I couldn't get this to work using the variable above in a quick test, but in that instance you could just use the code above without the variable - replacing $1 with the name of your field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that helps.&lt;/P&gt;&lt;P&gt;Steve&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 23 Mar 2014 13:37:43 GMT</pubDate>
    <dc:creator>stevedark</dc:creator>
    <dc:date>2014-03-23T13:37:43Z</dc:date>
    <item>
      <title>STRING FUNCTION</title>
      <link>https://community.qlik.com/t5/QlikView/STRING-FUNCTION/m-p/611006#M1104675</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI,&lt;/P&gt;&lt;P&gt;is there any function that change the order of the chars -&lt;/P&gt;&lt;P&gt;like from '1q2w3e' to 'e3w2q1'&lt;/P&gt;&lt;P&gt;or - 'abcd' to 'dcba'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;please help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 23 Mar 2014 12:44:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/STRING-FUNCTION/m-p/611006#M1104675</guid>
      <dc:creator>adiarnon</dc:creator>
      <dc:date>2014-03-23T12:44:50Z</dc:date>
    </item>
    <item>
      <title>Re: STRING FUNCTION</title>
      <link>https://community.qlik.com/t5/QlikView/STRING-FUNCTION/m-p/611007#M1104676</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 don't thing there is reversing function available but you can do this way&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=mid(Chr,len(Chr),1) &amp;amp; mid(Chr,len(Chr)-1,1) &amp;amp; mid(Chr,len(Chr)-2,1) &amp;amp; mid(Chr,len(Chr)-3,1) &amp;amp; mid(Chr,len(Chr)-4,1) &amp;amp; mid(Chr,len(Chr)-5,1)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 23 Mar 2014 12:58:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/STRING-FUNCTION/m-p/611007#M1104676</guid>
      <dc:creator>its_anandrjs</dc:creator>
      <dc:date>2014-03-23T12:58:50Z</dc:date>
    </item>
    <item>
      <title>Re: STRING FUNCTION</title>
      <link>https://community.qlik.com/t5/QlikView/STRING-FUNCTION/m-p/611008#M1104677</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi there,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In what context do you want to do this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If it's a single variable in a load script you could loop from 1 to the length of the string and build it backwards in your load script.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If it is a field in a LOAD statement then you could build the loop in a Macro and then that can be called in-line in the load statement.&amp;nbsp; Note that macros are generally considered a 'last resort' rather than anything else.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If it is in the front end you could do it in a variable that receives a parameter.&amp;nbsp; You could not do a loop here, so the syntax would need to be similar to Anand's example.&amp;nbsp; This would mean your function would have a maximum number of characters it could deal with.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the field is coming from a SQL database you may find that building the function in SQL is more efficient than doing the same thing in QlikView.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It may be possible to use the Variable with a parameter on a field in a load script - but I would not like to say that for sure.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you can provide the context I may be able to provide further pointers.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Steve&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 23 Mar 2014 13:10:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/STRING-FUNCTION/m-p/611008#M1104677</guid>
      <dc:creator>stevedark</dc:creator>
      <dc:date>2014-03-23T13:10:56Z</dc:date>
    </item>
    <item>
      <title>Re: STRING FUNCTION</title>
      <link>https://community.qlik.com/t5/QlikView/STRING-FUNCTION/m-p/611009#M1104678</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;perhaps here&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/message/406430"&gt;Reverse string&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 23 Mar 2014 13:12:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/STRING-FUNCTION/m-p/611009#M1104678</guid>
      <dc:creator>maxgro</dc:creator>
      <dc:date>2014-03-23T13:12:07Z</dc:date>
    </item>
    <item>
      <title>Re: STRING FUNCTION</title>
      <link>https://community.qlik.com/t5/QlikView/STRING-FUNCTION/m-p/611010#M1104679</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;its a dimension in a pivot table.&lt;/P&gt;&lt;P&gt;in the scheme the content of this field is reversed.&lt;/P&gt;&lt;P&gt;and i want that in my table it will be straight that the uses can read it...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 23 Mar 2014 13:17:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/STRING-FUNCTION/m-p/611010#M1104679</guid>
      <dc:creator>adiarnon</dc:creator>
      <dc:date>2014-03-23T13:17:00Z</dc:date>
    </item>
    <item>
      <title>Re: STRING FUNCTION</title>
      <link>https://community.qlik.com/t5/QlikView/STRING-FUNCTION/m-p/611011#M1104680</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In that case, your best bet is to create a variable called &lt;STRONG&gt;vReverse&lt;/STRONG&gt; and populate it with this code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;='mid($1, len($1) - 0, 1) &amp;amp; mid($1, len($1) - 1, 1) &amp;amp; mid($1, len($1) - 2, 1) &amp;amp; mid($1, len($1) - 3, 1) &amp;amp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; mid($1, len($1) - 4, 1) &amp;amp; mid($1, len($1) - 5, 1) &amp;amp; mid($1, len($1) - 6, 1) &amp;amp; mid($1, len($1) - 7, 1) &amp;amp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; mid($1, len($1) - 8, 1) &amp;amp; mid($1, len($1) - 9, 1) &amp;amp; mid($1, len($1) - 10, 1) &amp;amp; mid($1, len($1) - 11, 1) &amp;amp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; mid($1, len($1) - 12, 1) &amp;amp; mid($1, len($1) - 13, 1) &amp;amp; mid($1, len($1) - 14, 1) &amp;amp; mid($1, len($1) - 15, 1)'&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can then call a Calculated Dimension in your Pivot with the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;=$(vReverse(MyField))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It would be better to reverse the field in the load script and have two versions of the field.&amp;nbsp; I couldn't get this to work using the variable above in a quick test, but in that instance you could just use the code above without the variable - replacing $1 with the name of your field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that helps.&lt;/P&gt;&lt;P&gt;Steve&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 23 Mar 2014 13:37:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/STRING-FUNCTION/m-p/611011#M1104680</guid>
      <dc:creator>stevedark</dc:creator>
      <dc:date>2014-03-23T13:37:43Z</dc:date>
    </item>
  </channel>
</rss>

