<?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 Trimming a Field using an Expression in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Trimming-a-Field-using-an-Expression/m-p/978075#M962252</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Guys,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using the below expression to return a Descriptive line from a bill:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: blue; line-height: 115%; font-family: 'Arial','sans-serif'; font-size: 9pt; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-ansi-language: EN-GB; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;"&gt;Only&lt;/SPAN&gt;&lt;SPAN style="color: black; line-height: 115%; font-family: 'Arial','sans-serif'; font-size: 9pt; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-ansi-language: EN-GB; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;"&gt;({&amp;lt; &lt;/SPAN&gt;&lt;SPAN style="color: maroon; line-height: 115%; font-family: 'Arial','sans-serif'; font-size: 9pt; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-ansi-language: EN-GB; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;"&gt;DESCR_ON_BILL&lt;/SPAN&gt;&lt;SPAN style="color: black; line-height: 115%; font-family: 'Arial','sans-serif'; font-size: 9pt; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-ansi-language: EN-GB; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;"&gt;={&lt;/SPAN&gt;&lt;SPAN style="color: maroon; line-height: 115%; font-family: 'Arial','sans-serif'; font-size: 9pt; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-ansi-language: EN-GB; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;"&gt;"Sing*"&lt;/SPAN&gt;&lt;SPAN style="color: black; line-height: 115%; font-family: 'Arial','sans-serif'; font-size: 9pt; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-ansi-language: EN-GB; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;"&gt;}, &lt;/SPAN&gt;&lt;SPAN style="color: maroon; line-height: 115%; font-family: 'Arial','sans-serif'; font-size: 9pt; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-ansi-language: EN-GB; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;"&gt;ACCT_ID&lt;/SPAN&gt;&lt;SPAN style="color: black; line-height: 115%; font-family: 'Arial','sans-serif'; font-size: 9pt; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-ansi-language: EN-GB; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;"&gt;={123456789A}&amp;gt;}&lt;/SPAN&gt;&lt;SPAN style="color: maroon; line-height: 115%; font-family: 'Arial','sans-serif'; font-size: 9pt; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-ansi-language: EN-GB; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;"&gt;DESCR_ON_BILL&lt;/SPAN&gt;&lt;SPAN style="color: black; line-height: 115%; font-family: 'Arial','sans-serif'; font-size: 9pt; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-ansi-language: EN-GB; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;"&gt;)&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Which returns the full field as below&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-family: 'Tahoma','sans-serif'; font-size: 8pt; mso-fareast-font-family: 'Times New Roman'; mso-fareast-language: EN-GB;"&gt;Singing Bear ¬72¬ &lt;A href="mailto:Toy¬@¬€0.14"&gt;Toy¬@¬€0.14&lt;/A&gt;¬&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 10pt; font-family: arial,helvetica,sans-serif;"&gt;But I just want the expression to return the 0.14 value. However, I am not sure how to use the trim function within my current expression?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 10pt; font-family: arial,helvetica,sans-serif;"&gt;I cant change my load script as I need the full field in another part of the report so it would have to be through the expression.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 10pt; font-family: arial,helvetica,sans-serif;"&gt;Any help would be great,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 10pt; font-family: arial,helvetica,sans-serif;"&gt; cheers&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 14 Oct 2015 12:36:53 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2015-10-14T12:36:53Z</dc:date>
    <item>
      <title>Trimming a Field using an Expression</title>
      <link>https://community.qlik.com/t5/QlikView/Trimming-a-Field-using-an-Expression/m-p/978075#M962252</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Guys,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using the below expression to return a Descriptive line from a bill:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: blue; line-height: 115%; font-family: 'Arial','sans-serif'; font-size: 9pt; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-ansi-language: EN-GB; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;"&gt;Only&lt;/SPAN&gt;&lt;SPAN style="color: black; line-height: 115%; font-family: 'Arial','sans-serif'; font-size: 9pt; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-ansi-language: EN-GB; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;"&gt;({&amp;lt; &lt;/SPAN&gt;&lt;SPAN style="color: maroon; line-height: 115%; font-family: 'Arial','sans-serif'; font-size: 9pt; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-ansi-language: EN-GB; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;"&gt;DESCR_ON_BILL&lt;/SPAN&gt;&lt;SPAN style="color: black; line-height: 115%; font-family: 'Arial','sans-serif'; font-size: 9pt; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-ansi-language: EN-GB; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;"&gt;={&lt;/SPAN&gt;&lt;SPAN style="color: maroon; line-height: 115%; font-family: 'Arial','sans-serif'; font-size: 9pt; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-ansi-language: EN-GB; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;"&gt;"Sing*"&lt;/SPAN&gt;&lt;SPAN style="color: black; line-height: 115%; font-family: 'Arial','sans-serif'; font-size: 9pt; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-ansi-language: EN-GB; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;"&gt;}, &lt;/SPAN&gt;&lt;SPAN style="color: maroon; line-height: 115%; font-family: 'Arial','sans-serif'; font-size: 9pt; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-ansi-language: EN-GB; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;"&gt;ACCT_ID&lt;/SPAN&gt;&lt;SPAN style="color: black; line-height: 115%; font-family: 'Arial','sans-serif'; font-size: 9pt; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-ansi-language: EN-GB; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;"&gt;={123456789A}&amp;gt;}&lt;/SPAN&gt;&lt;SPAN style="color: maroon; line-height: 115%; font-family: 'Arial','sans-serif'; font-size: 9pt; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-ansi-language: EN-GB; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;"&gt;DESCR_ON_BILL&lt;/SPAN&gt;&lt;SPAN style="color: black; line-height: 115%; font-family: 'Arial','sans-serif'; font-size: 9pt; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-ansi-language: EN-GB; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;"&gt;)&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Which returns the full field as below&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-family: 'Tahoma','sans-serif'; font-size: 8pt; mso-fareast-font-family: 'Times New Roman'; mso-fareast-language: EN-GB;"&gt;Singing Bear ¬72¬ &lt;A href="mailto:Toy¬@¬€0.14"&gt;Toy¬@¬€0.14&lt;/A&gt;¬&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 10pt; font-family: arial,helvetica,sans-serif;"&gt;But I just want the expression to return the 0.14 value. However, I am not sure how to use the trim function within my current expression?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 10pt; font-family: arial,helvetica,sans-serif;"&gt;I cant change my load script as I need the full field in another part of the report so it would have to be through the expression.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 10pt; font-family: arial,helvetica,sans-serif;"&gt;Any help would be great,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 10pt; font-family: arial,helvetica,sans-serif;"&gt; cheers&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Oct 2015 12:36:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Trimming-a-Field-using-an-Expression/m-p/978075#M962252</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-10-14T12:36:53Z</dc:date>
    </item>
    <item>
      <title>Re: Trimming a Field using an Expression</title>
      <link>https://community.qlik.com/t5/QlikView/Trimming-a-Field-using-an-Expression/m-p/978076#M962253</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can use subfield to extract the value:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=SubField(&lt;SPAN style="font-size: 9pt; font-family: Arial, sans-serif; color: blue;"&gt;Only&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; font-family: Arial, sans-serif; color: black;"&gt;({&amp;lt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; font-family: Arial, sans-serif; color: maroon;"&gt;DESCR_ON_BILL&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; font-family: Arial, sans-serif; color: black;"&gt;={&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; font-family: Arial, sans-serif; color: maroon;"&gt;"Sing*"&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; font-family: Arial, sans-serif; color: black;"&gt;}, &lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; font-family: Arial, sans-serif; color: maroon;"&gt;ACCT_ID&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; font-family: Arial, sans-serif; color: black;"&gt;={123456789A}&amp;gt;}&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; font-family: Arial, sans-serif; color: maroon;"&gt;DESCR_ON_BILL&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; font-family: Arial, sans-serif; color: black;"&gt;) &lt;/SPAN&gt; ,'&lt;SPAN style="color: #333333; font-family: Tahoma, sans-serif; font-size: 10.6667px;"&gt;¬',-2)&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Oct 2015 12:38:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Trimming-a-Field-using-an-Expression/m-p/978076#M962253</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2015-10-14T12:38:20Z</dc:date>
    </item>
    <item>
      <title>Re: Trimming a Field using an Expression</title>
      <link>https://community.qlik.com/t5/QlikView/Trimming-a-Field-using-an-Expression/m-p/978077#M962254</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;if the position of the dollar values i.e. 0.14&amp;nbsp;&amp;nbsp; is fixed , than you cant use the sub field function with the offset value &lt;/P&gt;&lt;P class="syntax"&gt;&lt;A name="kanchor1300"&gt;&lt;/A&gt;&lt;A class="Bold" name="subfield"&gt;&lt;STRONG&gt;subfield&lt;/STRONG&gt;&lt;/A&gt;&lt;SPAN class="Bold"&gt;(&lt;/SPAN&gt;&lt;SPAN class="Italic"&gt;s, 'delimiter' [ , index ] &lt;/SPAN&gt;&lt;SPAN class="Bold"&gt;)&lt;/SPAN&gt; &lt;/P&gt;&lt;P&gt;In its three-parameter version, this script function returns a given substring from a larger string &lt;SPAN class="Italic"&gt;s&lt;/SPAN&gt; with delimiter &lt;SPAN class="Italic"&gt;'delimiter'&lt;/SPAN&gt;. &lt;SPAN class="Italic"&gt;index&lt;/SPAN&gt; is an optional integer denoting which of the substrings should be returned. If &lt;SPAN class="Italic"&gt;index&lt;/SPAN&gt; is omitted when&lt;SPAN style="font-weight: bold;"&gt; subfield&lt;/SPAN&gt; is used in a field expression in a &lt;SPAN style="font-weight: bold;"&gt;load&lt;/SPAN&gt; statement, the &lt;SPAN style="font-weight: bold;"&gt;subfield&lt;/SPAN&gt; function will cause the &lt;SPAN style="font-weight: bold;"&gt;load&lt;/SPAN&gt; statement to automatically generate one full record of input data for each substring that can be found in &lt;SPAN style="font-style: italic;"&gt;s&lt;/SPAN&gt;. &lt;/P&gt;&lt;P&gt;In its two-parameter version, the &lt;SPAN style="font-weight: bold;"&gt;subfield&lt;/SPAN&gt; function generates one record for each substring that can be taken from a larger string &lt;SPAN class="Italic"&gt;s&lt;/SPAN&gt; with the delimiter &lt;SPAN class="Italic"&gt;'delimiter'&lt;/SPAN&gt;. If several &lt;SPAN style="font-weight: bold;"&gt;subfield&lt;/SPAN&gt; functions are used in the same &lt;SPAN style="font-weight: bold;"&gt;load&lt;/SPAN&gt; statement, the Cartesian product of all combinations will be generated. &lt;/P&gt;&lt;P class="example"&gt;Examples:&lt;/P&gt;&lt;P&gt;(For three parameters)&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Code"&gt;subfield(S, ';' ,2)&lt;/SPAN&gt; returns '&lt;SPAN class="Italic"&gt;cde&lt;/SPAN&gt;' if S is '&lt;SPAN class="Italic"&gt;abc&lt;/SPAN&gt;;&lt;SPAN class="Italic"&gt;cde&lt;/SPAN&gt;;&lt;SPAN class="Italic"&gt;efg&lt;/SPAN&gt;'&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Code"&gt;subfield(S, ';' ,1)&lt;/SPAN&gt; returns NULL if S is an empty string&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Code"&gt;subfield(S, ';' ,1)&lt;/SPAN&gt; returns an empty string if S is ';'&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Oct 2015 12:39:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Trimming-a-Field-using-an-Expression/m-p/978077#M962254</guid>
      <dc:creator>avinashelite</dc:creator>
      <dc:date>2015-10-14T12:39:56Z</dc:date>
    </item>
    <item>
      <title>Re: Trimming a Field using an Expression</title>
      <link>https://community.qlik.com/t5/QlikView/Trimming-a-Field-using-an-Expression/m-p/978078#M962255</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Another possible solution:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=Textbetween(&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; font-family: Arial, sans-serif; color: blue;"&gt;Only&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; font-family: Arial, sans-serif; color: black;"&gt;({&amp;lt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; font-family: Arial, sans-serif; color: maroon;"&gt;DESCR_ON_BILL&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; font-family: Arial, sans-serif; color: black;"&gt;={&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; font-family: Arial, sans-serif; color: maroon;"&gt;"Sing*"&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; font-family: Arial, sans-serif; color: black;"&gt;}, &lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; font-family: Arial, sans-serif; color: maroon;"&gt;ACCT_ID&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; font-family: Arial, sans-serif; color: black;"&gt;={123456789A}&amp;gt;}&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; font-family: Arial, sans-serif; color: maroon;"&gt;DESCR_ON_BILL&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; font-family: Arial, sans-serif; color: black;"&gt;) &lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;,'€','&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.6667px; font-family: Tahoma, sans-serif; color: #333333;"&gt;¬')&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Oct 2015 12:41:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Trimming-a-Field-using-an-Expression/m-p/978078#M962255</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2015-10-14T12:41:59Z</dc:date>
    </item>
    <item>
      <title>Re: Trimming a Field using an Expression</title>
      <link>https://community.qlik.com/t5/QlikView/Trimming-a-Field-using-an-Expression/m-p/978079#M962256</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This seems to work perfectly. Thank you&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Oct 2015 12:48:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Trimming-a-Field-using-an-Expression/m-p/978079#M962256</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-10-14T12:48:48Z</dc:date>
    </item>
  </channel>
</rss>

