<?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: How to Trim Leading Zero's from Numeric value of a Alpha Numeric datatype in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/How-to-Trim-Leading-Zero-s-from-Numeric-value-of-a-Alpha-Numeric/m-p/1447332#M35192</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think this would work&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Text(If(isnum(foo),Num(foo),foo))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This one returns a text value if you want the field to be mixed with text and numbers then pull off the Text() function but then in list boxes you will see the strings lined up to the left and numbers lined up to the right.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 22 Aug 2017 20:51:32 GMT</pubDate>
    <dc:creator>chriscammers</dc:creator>
    <dc:date>2017-08-22T20:51:32Z</dc:date>
    <item>
      <title>How to Trim Leading Zero's from Numeric value of a Alpha Numeric datatype</title>
      <link>https://community.qlik.com/t5/App-Development/How-to-Trim-Leading-Zero-s-from-Numeric-value-of-a-Alpha-Numeric/m-p/1447329#M35189</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Need Help in Trimming Leading zero's from a Alpha Numeric data type.&lt;/P&gt;&lt;P&gt;We bring data to Qlik Sense from SAP BW. In this Case Material which is a 18 digit alphanumeric character.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My Data looks like:&lt;/P&gt;&lt;P&gt;00000000000100345&lt;/P&gt;&lt;P&gt;00000000000100692&lt;/P&gt;&lt;P&gt;05241X-001&lt;/P&gt;&lt;P&gt;05491X-001&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would like to remove leading zeros from only numeric fields. The result set should be like&lt;/P&gt;&lt;P&gt;100345&lt;/P&gt;&lt;P&gt;100692&lt;/P&gt;&lt;P&gt;05241X-001&lt;/P&gt;&lt;P&gt;05491X-001&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am currently using the below script for Customer data to remove leading zero's which is working, this will not work for Material because it will trim Zero's for 05241X-001 value also.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Replace(LTrim(Replace(CUSTOMER,'0',' ')),' ','0') as Customer&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I searched other Qlik Threads for solution also but didn't find anything helpful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any Suggestions will be appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Dileep Chalasani.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Aug 2017 19:09:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/How-to-Trim-Leading-Zero-s-from-Numeric-value-of-a-Alpha-Numeric/m-p/1447329#M35189</guid>
      <dc:creator>dileepchalasani</dc:creator>
      <dc:date>2017-08-22T19:09:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to Trim Leading Zero's from Numeric value of a Alpha Numeric datatype</title>
      <link>https://community.qlik.com/t5/App-Development/How-to-Trim-Leading-Zero-s-from-Numeric-value-of-a-Alpha-Numeric/m-p/1447330#M35190</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;&lt;STRONG&gt;If(IsNum(Replace(LTrim(Replace(CUSTOMER,'0',' ')),' ','0')), Replace(LTrim(Replace(CUSTOMER,'0',' ')),' ','0'), CUSTOMER) as Customer&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Aug 2017 19:33:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/How-to-Trim-Leading-Zero-s-from-Numeric-value-of-a-Alpha-Numeric/m-p/1447330#M35190</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2017-08-22T19:33:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to Trim Leading Zero's from Numeric value of a Alpha Numeric datatype</title>
      <link>https://community.qlik.com/t5/App-Development/How-to-Trim-Leading-Zero-s-from-Numeric-value-of-a-Alpha-Numeric/m-p/1447331#M35191</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Or this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Alt(Num(Replace(LTrim(Replace(CUSTOMER,'0',' ')),' ','0')), CUSTOMER) as Customer&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Aug 2017 19:34:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/How-to-Trim-Leading-Zero-s-from-Numeric-value-of-a-Alpha-Numeric/m-p/1447331#M35191</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2017-08-22T19:34:55Z</dc:date>
    </item>
    <item>
      <title>Re: How to Trim Leading Zero's from Numeric value of a Alpha Numeric datatype</title>
      <link>https://community.qlik.com/t5/App-Development/How-to-Trim-Leading-Zero-s-from-Numeric-value-of-a-Alpha-Numeric/m-p/1447332#M35192</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think this would work&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Text(If(isnum(foo),Num(foo),foo))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This one returns a text value if you want the field to be mixed with text and numbers then pull off the Text() function but then in list boxes you will see the strings lined up to the left and numbers lined up to the right.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Aug 2017 20:51:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/How-to-Trim-Leading-Zero-s-from-Numeric-value-of-a-Alpha-Numeric/m-p/1447332#M35192</guid>
      <dc:creator>chriscammers</dc:creator>
      <dc:date>2017-08-22T20:51:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to Trim Leading Zero's from Numeric value of a Alpha Numeric datatype</title>
      <link>https://community.qlik.com/t5/App-Development/How-to-Trim-Leading-Zero-s-from-Numeric-value-of-a-Alpha-Numeric/m-p/1447333#M35193</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Never mind, I did not read the original post very carefully.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;is the pattern with the dash consistent? for example you could use subfield&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;Text(If(isnum(subfield(foo,'-',1)),Num(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;subfield(foo,'-',1)&lt;/SPAN&gt;),&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;subfield(foo,'-',1)&lt;/SPAN&gt;)) &amp;amp; If(Len(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;subfield(foo,'-',2)&amp;gt;0,'-' &amp;amp; &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Text(If(isnum(subfield(foo,'-',2)),Num(&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;subfield(foo,'-',2)&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="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;subfield(foo,'-',2)&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&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Of course if pattern with the dashes is not consistent or if you have values with more than one dash then you need to figure out what the most number of dashes is and write a dynamic expression based on that.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;ugh that sounds terrible.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Aug 2017 20:58:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/How-to-Trim-Leading-Zero-s-from-Numeric-value-of-a-Alpha-Numeric/m-p/1447333#M35193</guid>
      <dc:creator>chriscammers</dc:creator>
      <dc:date>2017-08-22T20:58:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to Trim Leading Zero's from Numeric value of a Alpha Numeric datatype</title>
      <link>https://community.qlik.com/t5/App-Development/How-to-Trim-Leading-Zero-s-from-Numeric-value-of-a-Alpha-Numeric/m-p/1447334#M35194</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If your 18 digit alphanumeric material actually might show only up to 14 significant numeric digits...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Slightly changing Chris initial approach:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; LOAD *,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;Text(If(Isnum(evaluate(Test)),Num(evaluate(Test)),Test)) as Test2&lt;/STRONG&gt; &lt;/P&gt;&lt;P&gt;INLINE [&lt;/P&gt;&lt;P&gt; Test&lt;/P&gt;&lt;P&gt;00000000000100345&lt;/P&gt;&lt;P&gt;00000000000100692&lt;/P&gt;&lt;P&gt;05241X-001&lt;/P&gt;&lt;P&gt;05491X-001&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE bgcolor="#ffffff" border="1" cellpadding="2" cellspacing="0" style="font-size: 9pt;"&gt;&lt;TBODY&gt;&lt;TR bgcolor="#f5f5f5"&gt;&lt;TH nowrap="nowrap"&gt;&lt;SPAN style="color: #363636;"&gt;&lt;STRONG&gt;Test&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt; &lt;/STRONG&gt;&lt;/TH&gt;&lt;TH nowrap="nowrap"&gt;&lt;SPAN style="color: #363636;"&gt;&lt;STRONG&gt;Test2&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt; &lt;/STRONG&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR bgcolor="#ffffff"&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;05241X-001&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;05241X-001&lt;/SPAN&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;TR bgcolor="#ffffff"&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;05491X-001&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;05491X-001&lt;/SPAN&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;TR bgcolor="#ffffff"&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;00000000000100345&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;100345&lt;/SPAN&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;TR bgcolor="#ffffff"&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;00000000000100692&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;100692&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Aug 2017 23:06:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/How-to-Trim-Leading-Zero-s-from-Numeric-value-of-a-Alpha-Numeric/m-p/1447334#M35194</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2017-08-22T23:06:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to Trim Leading Zero's from Numeric value of a Alpha Numeric datatype</title>
      <link>https://community.qlik.com/t5/App-Development/How-to-Trim-Leading-Zero-s-from-Numeric-value-of-a-Alpha-Numeric/m-p/1447335#M35195</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Sunny, This is working, i am able to trim zero's for only numeric fields.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Aug 2017 12:35:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/How-to-Trim-Leading-Zero-s-from-Numeric-value-of-a-Alpha-Numeric/m-p/1447335#M35195</guid>
      <dc:creator>dileepchalasani</dc:creator>
      <dc:date>2017-08-23T12:35:30Z</dc:date>
    </item>
    <item>
      <title>Re: How to Trim Leading Zero's from Numeric value of a Alpha Numeric datatype</title>
      <link>https://community.qlik.com/t5/App-Development/How-to-Trim-Leading-Zero-s-from-Numeric-value-of-a-Alpha-Numeric/m-p/1447336#M35196</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Awesome &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please close the thread by marking correct and helpful responses.&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/docs/DOC-14806"&gt;Qlik Community Tip: Marking Replies as Correct or Helpful&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;Sunny&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Aug 2017 12:36:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/How-to-Trim-Leading-Zero-s-from-Numeric-value-of-a-Alpha-Numeric/m-p/1447336#M35196</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2017-08-23T12:36:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to Trim Leading Zero's from Numeric value of a Alpha Numeric datatype</title>
      <link>https://community.qlik.com/t5/App-Development/How-to-Trim-Leading-Zero-s-from-Numeric-value-of-a-Alpha-Numeric/m-p/1447337#M35197</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Stefan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is working for most of the cases except where the numeric field has dash, like 122-01-01.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/174388_pastedImage_0.png" style="max-height: 900px; max-width: 1200px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Aug 2017 12:40:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/How-to-Trim-Leading-Zero-s-from-Numeric-value-of-a-Alpha-Numeric/m-p/1447337#M35197</guid>
      <dc:creator>dileepchalasani</dc:creator>
      <dc:date>2017-08-23T12:40:35Z</dc:date>
    </item>
  </channel>
</rss>

