<?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 Reverse a value in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Reverse-a-value/m-p/155625#M31806</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;BR /&gt;&lt;BR /&gt;Im trying to take a value eg. 123456789 and get a new value with the same digits but backwards ( so ill be getting 987654321). Does anyone know how to do this because ive tried using replace(index but im not successful.&lt;BR /&gt;&lt;BR /&gt;Any help is appreciated, thanks in advance&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 05 Jan 2011 13:56:14 GMT</pubDate>
    <dc:creator />
    <dc:date>2011-01-05T13:56:14Z</dc:date>
    <item>
      <title>Reverse a value</title>
      <link>https://community.qlik.com/t5/QlikView/Reverse-a-value/m-p/155625#M31806</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;BR /&gt;&lt;BR /&gt;Im trying to take a value eg. 123456789 and get a new value with the same digits but backwards ( so ill be getting 987654321). Does anyone know how to do this because ive tried using replace(index but im not successful.&lt;BR /&gt;&lt;BR /&gt;Any help is appreciated, thanks in advance&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Jan 2011 13:56:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Reverse-a-value/m-p/155625#M31806</guid>
      <dc:creator />
      <dc:date>2011-01-05T13:56:14Z</dc:date>
    </item>
    <item>
      <title>Reverse a value</title>
      <link>https://community.qlik.com/t5/QlikView/Reverse-a-value/m-p/155626#M31807</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, i've made this macro&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;&lt;BR /&gt;&lt;BR /&gt;Function reverse(t)&lt;BR /&gt; r = ""&lt;BR /&gt; For i = len(t) to 1 step -1&lt;BR /&gt; r = r &amp;amp; mid(t,i,1)&lt;BR /&gt; next&lt;BR /&gt; reverse = r&lt;BR /&gt;end Function&lt;BR /&gt;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;P&gt;And you can call it from the script&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;&lt;BR /&gt;&lt;BR /&gt;LOAD&lt;BR /&gt; *,&lt;BR /&gt; reverse(F1) as F1_reverse&lt;BR /&gt;INLINE [&lt;BR /&gt; F1&lt;BR /&gt; 123456789&lt;BR /&gt;];&lt;BR /&gt;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;It works for me, can you try it?&lt;/P&gt;&lt;P&gt;Rgds&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Jan 2011 14:05:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Reverse-a-value/m-p/155626#M31807</guid>
      <dc:creator>hector</dc:creator>
      <dc:date>2011-01-05T14:05:33Z</dc:date>
    </item>
    <item>
      <title>Reverse a value</title>
      <link>https://community.qlik.com/t5/QlikView/Reverse-a-value/m-p/155627#M31808</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the step in the right direction, yeah ive got it working however I trying use it for a field so when i use a field, the field name appears backwards instead of the value.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Jan 2011 14:38:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Reverse-a-value/m-p/155627#M31808</guid>
      <dc:creator />
      <dc:date>2011-01-05T14:38:37Z</dc:date>
    </item>
    <item>
      <title>Reverse a value</title>
      <link>https://community.qlik.com/t5/QlikView/Reverse-a-value/m-p/155628#M31809</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi again&lt;/P&gt;&lt;P&gt;Please note that reverse(F1) is different of reverse('F1')&lt;/P&gt;&lt;P&gt;For the first case, the function will reverse the value of the field F1 and you can put an alias to name it, and in the second one it's going to reverse the text "F1", so the function will return "1F"&lt;/P&gt;&lt;P&gt;is this your problem?&lt;/P&gt;&lt;P&gt;Rgds&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Jan 2011 14:46:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Reverse-a-value/m-p/155628#M31809</guid>
      <dc:creator>hector</dc:creator>
      <dc:date>2011-01-05T14:46:42Z</dc:date>
    </item>
    <item>
      <title>Reverse a value</title>
      <link>https://community.qlik.com/t5/QlikView/Reverse-a-value/m-p/155629#M31810</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;BR /&gt;&lt;BR /&gt;Basically in ur example you have used 123456789 as just plain text, im trying to change that 123456789 to a field from a qvd. so basically what my code shows&lt;BR /&gt;&lt;B&gt;&lt;/B&gt;&lt;/P&gt;&lt;P style="font-weight: bold"&gt;LOAD&lt;/P&gt;&lt;B&gt;&lt;/B&gt;&lt;P style="font-weight: bold"&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;,&lt;/P&gt;&lt;P&gt;reverse&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;(F1) &lt;B&gt;as&lt;/B&gt; &lt;P&gt;F1_reverse&lt;/P&gt;&lt;B&gt;&lt;/B&gt;&lt;P style="font-weight: bold"&gt;INLINE&lt;/P&gt;&lt;P style="font-weight: bold"&gt;[ FI&lt;BR /&gt;CI_PER.PER_ID&lt;/P&gt;&lt;P style="font-weight: bold"&gt;; but the function is taking the text CI_PER.PER_ID and changing it to DI_REP.REP_IC instead to taking the value of that field&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Jan 2011 15:01:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Reverse-a-value/m-p/155629#M31810</guid>
      <dc:creator />
      <dc:date>2011-01-05T15:01:10Z</dc:date>
    </item>
    <item>
      <title>Reverse a value</title>
      <link>https://community.qlik.com/t5/QlikView/Reverse-a-value/m-p/155630#M31811</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;The inline table was just an example for the functionallity and it's application, you need to use the function inside the load of your QVD file, i mean&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;&lt;BR /&gt;Load&lt;BR /&gt;Field1,&lt;BR /&gt;Field2,&lt;BR /&gt;reverse(Field2) as Reverse_Field2&lt;BR /&gt;....&lt;BR /&gt;From QvdFile.qvd (qvd);&lt;BR /&gt;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;You can use the function &lt;B&gt;reverse&lt;/B&gt; in the same way you use other qlikview functions like year(), month(), applymap() etc&lt;/P&gt;&lt;P&gt;Rgds&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Jan 2011 15:07:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Reverse-a-value/m-p/155630#M31811</guid>
      <dc:creator>hector</dc:creator>
      <dc:date>2011-01-05T15:07:15Z</dc:date>
    </item>
    <item>
      <title>Reverse a value</title>
      <link>https://community.qlik.com/t5/QlikView/Reverse-a-value/m-p/155631#M31812</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yeah I got that working now, thanks alot for your help. Your a legend&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Jan 2011 15:55:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Reverse-a-value/m-p/155631#M31812</guid>
      <dc:creator />
      <dc:date>2011-01-05T15:55:13Z</dc:date>
    </item>
    <item>
      <title>Reverse a value</title>
      <link>https://community.qlik.com/t5/QlikView/Reverse-a-value/m-p/155632#M31813</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No problem &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;&lt;P&gt;greetings&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Jan 2011 16:02:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Reverse-a-value/m-p/155632#M31813</guid>
      <dc:creator>hector</dc:creator>
      <dc:date>2011-01-05T16:02:58Z</dc:date>
    </item>
    <item>
      <title>Re: Reverse a value</title>
      <link>https://community.qlik.com/t5/QlikView/Reverse-a-value/m-p/155633#M31814</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;BR /&gt;Could you indicate how to declare this script inside the load statement of QV?&lt;/P&gt;&lt;P&gt;I am trying to have it in a include file, without much success.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Antoine&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Oct 2013 14:16:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Reverse-a-value/m-p/155633#M31814</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-10-14T14:16:51Z</dc:date>
    </item>
  </channel>
</rss>

