<?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 right function not working properly in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/String-right-function-not-working-properly/m-p/1056378#M354066</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;may be this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Right('KSN_PXRU4471&amp;nbsp;&amp;nbsp;&amp;nbsp; 001',15)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 19 Apr 2016 09:44:17 GMT</pubDate>
    <dc:creator>arulsettu</dc:creator>
    <dc:date>2016-04-19T09:44:17Z</dc:date>
    <item>
      <title>String right function not working properly</title>
      <link>https://community.qlik.com/t5/QlikView/String-right-function-not-working-properly/m-p/1056375#M354063</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a single field value as mentioned below,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;KSN_PXRU4471&amp;nbsp;&amp;nbsp;&amp;nbsp; 001&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;From above value, I need the characters after underscore '&lt;SPAN style="font-size: 13.3333px;"&gt;PXRU4471&amp;nbsp;&amp;nbsp;&amp;nbsp; 001&lt;/SPAN&gt;'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I tried with the formula of '=Right(ITEM_KEY,Index(ITEM_KEY,'_'))', I get an output as '0001'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you please let me know whether I am missing anything?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Karthikeyan.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Apr 2016 09:39:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/String-right-function-not-working-properly/m-p/1056375#M354063</guid>
      <dc:creator>karthikeyan1504</dc:creator>
      <dc:date>2016-04-19T09:39:15Z</dc:date>
    </item>
    <item>
      <title>Re: String right function not working properly</title>
      <link>https://community.qlik.com/t5/QlikView/String-right-function-not-working-properly/m-p/1056376#M354064</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Have you tried SubField?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;=SubField('&lt;/STRONG&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;STRONG&gt;KSN_PXRU4471&amp;nbsp;&amp;nbsp;&amp;nbsp; 001', '_', 2)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;STRONG&gt;=SubField('&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;STRONG&gt;KSN_PXRU4471&amp;nbsp;&amp;nbsp;&amp;nbsp; 001', '_', -1)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Apr 2016 09:40:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/String-right-function-not-working-properly/m-p/1056376#M354064</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-04-19T09:40:21Z</dc:date>
    </item>
    <item>
      <title>Re: String right function not working properly</title>
      <link>https://community.qlik.com/t5/QlikView/String-right-function-not-working-properly/m-p/1056377#M354065</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you want to use Right, you can try this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;=Right('KSN_PXRU4471&amp;nbsp;&amp;nbsp;&amp;nbsp; 001', Len('KSN_PXRU4471&amp;nbsp;&amp;nbsp;&amp;nbsp; 001') - Index('KSN_PXRU4471&amp;nbsp;&amp;nbsp;&amp;nbsp; 001', '_'))&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Apr 2016 09:41:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/String-right-function-not-working-properly/m-p/1056377#M354065</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-04-19T09:41:53Z</dc:date>
    </item>
    <item>
      <title>Re: String right function not working properly</title>
      <link>https://community.qlik.com/t5/QlikView/String-right-function-not-working-properly/m-p/1056378#M354066</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;may be this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Right('KSN_PXRU4471&amp;nbsp;&amp;nbsp;&amp;nbsp; 001',15)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Apr 2016 09:44:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/String-right-function-not-working-properly/m-p/1056378#M354066</guid>
      <dc:creator>arulsettu</dc:creator>
      <dc:date>2016-04-19T09:44:17Z</dc:date>
    </item>
    <item>
      <title>Re: String right function not working properly</title>
      <link>https://community.qlik.com/t5/QlikView/String-right-function-not-working-properly/m-p/1056379#M354067</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;It is better to use Subfield function for the data extraction when the data seperated by any delimiter.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Apr 2016 09:46:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/String-right-function-not-working-properly/m-p/1056379#M354067</guid>
      <dc:creator />
      <dc:date>2016-04-19T09:46:35Z</dc:date>
    </item>
    <item>
      <title>Re: String right function not working properly</title>
      <link>https://community.qlik.com/t5/QlikView/String-right-function-not-working-properly/m-p/1056380#M354068</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Right(YourFieldName, len(&lt;SPAN style="font-size: 13.3333px;"&gt;YourFieldName&lt;/SPAN&gt;)-Index(&lt;SPAN style="font-size: 13.3333px;"&gt;YourFieldName&lt;/SPAN&gt;, '_') as YourField&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Nico&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Apr 2016 09:53:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/String-right-function-not-working-properly/m-p/1056380#M354068</guid>
      <dc:creator>nico_ilog</dc:creator>
      <dc:date>2016-04-19T09:53:28Z</dc:date>
    </item>
    <item>
      <title>Re: String right function not working properly</title>
      <link>https://community.qlik.com/t5/QlikView/String-right-function-not-working-properly/m-p/1056381#M354069</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;EM&gt;There are many ways to get the result. Subfield looks simple compared to other methods&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;=SubField(' &lt;/EM&gt;&lt;SPAN style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;EM&gt;KSN_PXRU4471&amp;nbsp;&amp;nbsp;&amp;nbsp; 001', '_', 2)&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;=Right('KSN_PXRU4471&amp;nbsp;&amp;nbsp;&amp;nbsp; 001', Len('KSN_PXRU4471&amp;nbsp;&amp;nbsp;&amp;nbsp; 001') - FindOneOf('KSN_PXRU4471&amp;nbsp;&amp;nbsp;&amp;nbsp; 001', '_'))&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;=Mid('KSN_PXRU4471&amp;nbsp;&amp;nbsp;&amp;nbsp; 001', Index('KSN_PXRU4471&amp;nbsp;&amp;nbsp;&amp;nbsp; 001', '_')+1)&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Apr 2016 09:54:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/String-right-function-not-working-properly/m-p/1056381#M354069</guid>
      <dc:creator>tamilarasu</dc:creator>
      <dc:date>2016-04-19T09:54:18Z</dc:date>
    </item>
    <item>
      <title>Re: String right function not working properly</title>
      <link>https://community.qlik.com/t5/QlikView/String-right-function-not-working-properly/m-p/1056382#M354070</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can get what you want with an expression like above.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But why do you think the right() function is not working properly?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;"right(text(ITEM_KEY),4)', I get an output as '0001'."&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;0001 are the four rightmost&amp;nbsp; characters in ITEM_KEY. So I can't see any issue with Right() function here.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Or how do you expect the Right() function to work?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Apr 2016 10:03:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/String-right-function-not-working-properly/m-p/1056382#M354070</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2016-04-19T10:03:19Z</dc:date>
    </item>
    <item>
      <title>Re: String right function not working properly</title>
      <link>https://community.qlik.com/t5/QlikView/String-right-function-not-working-properly/m-p/1056383#M354071</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Karthikeyan&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Right() will return the last X characters of a string, so '=right(text(ITEM_KEY),4) can be translated as "give me the 4 last characters of each ITEM_KEY.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For your intentions it seems that Mid() is what you were looking for, something like: =Mid(Text(ITEM_KEY), 5), wich can be translated as "give me all the string from the 5th characther (removing the first 4 characters)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The options proposed by other users can also work.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Apr 2016 10:04:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/String-right-function-not-working-properly/m-p/1056383#M354071</guid>
      <dc:creator>rubenmarin</dc:creator>
      <dc:date>2016-04-19T10:04:41Z</dc:date>
    </item>
    <item>
      <title>Re: String right function not working properly</title>
      <link>https://community.qlik.com/t5/QlikView/String-right-function-not-working-properly/m-p/1056384#M354072</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am sorry. I have edited my question now.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The function I have used is =Right(ITEM_KEY,Index(ITEM_KEY,'_'))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Apr 2016 10:33:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/String-right-function-not-working-properly/m-p/1056384#M354072</guid>
      <dc:creator>karthikeyan1504</dc:creator>
      <dc:date>2016-04-19T10:33:59Z</dc:date>
    </item>
    <item>
      <title>Re: String right function not working properly</title>
      <link>https://community.qlik.com/t5/QlikView/String-right-function-not-working-properly/m-p/1056385#M354073</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think the issue is that the Index function gives you the location of the first instance of '_' which is at number 4 spot and that is why you see 4 character getting pulled from the right. In order to get to '_' from the right, you need to do &lt;STRONG&gt;Len(Field) - Index(Field, '_') &lt;/STRONG&gt; -&amp;gt; Which will get you the number of characters to be pulled from right before you hit '_'&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Apr 2016 11:09:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/String-right-function-not-working-properly/m-p/1056385#M354073</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-04-19T11:09:29Z</dc:date>
    </item>
    <item>
      <title>Re: String right function not working properly</title>
      <link>https://community.qlik.com/t5/QlikView/String-right-function-not-working-properly/m-p/1056386#M354074</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Or just use&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;EM&gt;Mid( Field, Index(Field, '_')+1)&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;as suggested above.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(Or subfield(), but this only works in your case if the separator '_' is only occuring once).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;edit:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My point is, choose the most appropriate solution for your setting. To be able to do this, learn more about string functions:&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.qlik.com/en-US/qlikview/12.0/Subsystems/Client/Content/Scripting/StringFunctions/string-functions.htm?q=string%20functions" title="http://help.qlik.com/en-US/qlikview/12.0/Subsystems/Client/Content/Scripting/StringFunctions/string-functions.htm?q=string%20functions"&gt;String functions ‒ QlikView&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Apr 2016 11:13:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/String-right-function-not-working-properly/m-p/1056386#M354074</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2016-04-19T11:13:57Z</dc:date>
    </item>
    <item>
      <title>Re: String right function not working properly</title>
      <link>https://community.qlik.com/t5/QlikView/String-right-function-not-working-properly/m-p/1056387#M354075</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/qlik-users/171708"&gt;stalwar1&lt;/A&gt;‌&lt;/P&gt;&lt;P&gt;Sunny,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there some way I could use this type of syntax in the load script with the stripHMTL module?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;TextBetween&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;( &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;stripHTML&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;DESCRIPTION&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;) , 'Analytics:' , &lt;STRONG style="color: #ff0000;"&gt;'XXXXXX&lt;/STRONG&gt; )&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;ANALYTICS&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;, &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Analytics gets truncated in the field value so it's always something different. My thought was to use the Right() to identify the last few characters of the field as the ending point of the value for the new ANALYTICS field. Make sense?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Sep 2017 19:37:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/String-right-function-not-working-properly/m-p/1056387#M354075</guid>
      <dc:creator>cbaqir</dc:creator>
      <dc:date>2017-09-21T19:37:00Z</dc:date>
    </item>
  </channel>
</rss>

