<?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: Help with leading zero expression in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Help-with-leading-zero-expression/m-p/1204651#M387298</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Change from&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;repeat('0', (7 - len([Field))) &amp;amp; [Field] as Unique_ID&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;to&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;repeat('0', (7 - len( [Field&lt;STRONG&gt;] &lt;/STRONG&gt;)) &amp;amp; [Field] as Unique_ID&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 06 Oct 2016 07:58:34 GMT</pubDate>
    <dc:creator>zhadrakas</dc:creator>
    <dc:date>2016-10-06T07:58:34Z</dc:date>
    <item>
      <title>Help with leading zero expression</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-leading-zero-expression/m-p/1204649#M387296</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Qlikview user&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a field which is a unique identifier.&amp;nbsp;&amp;nbsp; The unique identifier starts from 1 digit up to 7 digits, so for those values which have just one number I wanted to pad out the string with zero's&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I.e. Identifier 799 would be padded out to be 0000799&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have used the following function to create this effect:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;repeat('0', (7 - len([Field))) &amp;amp; [Field] as Unique_ID&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This technique works and pads out the field, however it is also adding a 0 to values which are already 7 digits long&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I.e. 10080866 should be 1080866&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For the life of me I cannot see why the function is doing this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help would be greatly appreciated&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Helen&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Oct 2016 07:49:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-leading-zero-expression/m-p/1204649#M387296</guid>
      <dc:creator>helen_pip</dc:creator>
      <dc:date>2016-10-06T07:49:10Z</dc:date>
    </item>
    <item>
      <title>Re: Help with leading zero expression</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-leading-zero-expression/m-p/1204650#M387297</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Helen,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;That is really weird as it seems to work fine for me?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/139821_Capture.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Oct 2016 07:54:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-leading-zero-expression/m-p/1204650#M387297</guid>
      <dc:creator>adamdavi3s</dc:creator>
      <dc:date>2016-10-06T07:54:11Z</dc:date>
    </item>
    <item>
      <title>Re: Help with leading zero expression</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-leading-zero-expression/m-p/1204651#M387298</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Change from&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;repeat('0', (7 - len([Field))) &amp;amp; [Field] as Unique_ID&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;to&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;repeat('0', (7 - len( [Field&lt;STRONG&gt;] &lt;/STRONG&gt;)) &amp;amp; [Field] as Unique_ID&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Oct 2016 07:58:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-leading-zero-expression/m-p/1204651#M387298</guid>
      <dc:creator>zhadrakas</dc:creator>
      <dc:date>2016-10-06T07:58:34Z</dc:date>
    </item>
    <item>
      <title>Re: Help with leading zero expression</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-leading-zero-expression/m-p/1204652#M387299</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Tim&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for the response&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I must admit, that was just a bad copy and paste job&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Helen&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Oct 2016 08:01:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-leading-zero-expression/m-p/1204652#M387299</guid>
      <dc:creator>helen_pip</dc:creator>
      <dc:date>2016-10-06T08:01:47Z</dc:date>
    </item>
    <item>
      <title>Re: Help with leading zero expression</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-leading-zero-expression/m-p/1204653#M387300</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Adam&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Umm!&amp;nbsp; I am pleased to hear that it is not necessarily the function...I will look into my data some more&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Helen&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Oct 2016 08:02:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-leading-zero-expression/m-p/1204653#M387300</guid>
      <dc:creator>helen_pip</dc:creator>
      <dc:date>2016-10-06T08:02:57Z</dc:date>
    </item>
    <item>
      <title>Re: Help with leading zero expression</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-leading-zero-expression/m-p/1204654#M387301</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Helen,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hmmm it is weird to see how it could be a data issue though, as if it had trailing spaces etc you would expect the length to be more than 7 so it wouldn't do anything...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Interested to know though!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Oct 2016 08:05:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-leading-zero-expression/m-p/1204654#M387301</guid>
      <dc:creator>adamdavi3s</dc:creator>
      <dc:date>2016-10-06T08:05:25Z</dc:date>
    </item>
    <item>
      <title>Re: Help with leading zero expression</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-leading-zero-expression/m-p/1204655#M387302</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Helen,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;You can also use Num function&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Num(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Field&lt;/SPAN&gt;,'0000000')&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Oct 2016 08:09:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-leading-zero-expression/m-p/1204655#M387302</guid>
      <dc:creator>tamilarasu</dc:creator>
      <dc:date>2016-10-06T08:09:59Z</dc:date>
    </item>
    <item>
      <title>Re: Help with leading zero expression</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-leading-zero-expression/m-p/1204656#M387303</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;if(Len([&lt;SPAN style="color: #000000; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Field]&lt;/SPAN&gt;)&amp;lt;7,Repeat(0,7-Len([&lt;SPAN style="color: #000000; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Field]&lt;/SPAN&gt;))&amp;amp;[&lt;SPAN style="color: #000000; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Field]&lt;/SPAN&gt;,Left([&lt;SPAN style="color: #000000; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Field]&lt;/SPAN&gt;,7)) AS [&amp;lt;=7],&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Oct 2016 14:23:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-leading-zero-expression/m-p/1204656#M387303</guid>
      <dc:creator>el_aprendiz111</dc:creator>
      <dc:date>2016-10-06T14:23:52Z</dc:date>
    </item>
  </channel>
</rss>

