<?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: Turn text numbers to number numbers in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Turn-text-numbers-to-number-numbers/m-p/385009#M491297</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;&lt;/P&gt;&lt;P style="background-color: #eef4f9; font-size: 12px; color: #636363; font-family: Arial;"&gt;&lt;SPAN style="color: #636363; font-family: Arial; font-size: 12px; background-color: #ffffff;"&gt;if(left(&lt;/SPAN&gt;&lt;SPAN style="color: #636363; font-family: Arial; font-size: 12px; background-color: #ffffff;"&gt;NumTextField,1)='(', &lt;/SPAN&gt;&lt;SPAN style="color: #636363; font-family: Arial; font-size: 12px; background-color: #ffffff;"&gt;num#(replace(replace(NumTextField, '(',''), ')', ''))*(-1),&lt;/SPAN&gt;&lt;SPAN style="color: #636363; font-family: Arial; font-size: 12px; background-color: #ffffff;"&gt;num#(replace(replace(NumTextField, '(',''), ')', '')))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="background-color: #eef4f9; font-size: 12px; color: #636363; font-family: Arial;"&gt;&lt;SPAN style="color: #636363; font-family: Arial; font-size: 12px; background-color: #ffffff;"&gt;Replaceing ( with - is still creating a string&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 06 Sep 2012 15:02:47 GMT</pubDate>
    <dc:creator />
    <dc:date>2012-09-06T15:02:47Z</dc:date>
    <item>
      <title>Turn text numbers to number numbers</title>
      <link>https://community.qlik.com/t5/QlikView/Turn-text-numbers-to-number-numbers/m-p/385005#M491293</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi community,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a field of numbers.&amp;nbsp; For some reason some of them are text and some of them are numbers.&amp;nbsp; Is there a way to get the text numbers to have a number format?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Sep 2012 14:35:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Turn-text-numbers-to-number-numbers/m-p/385005#M491293</guid>
      <dc:creator />
      <dc:date>2012-09-06T14:35:56Z</dc:date>
    </item>
    <item>
      <title>Re: Turn text numbers to number numbers</title>
      <link>https://community.qlik.com/t5/QlikView/Turn-text-numbers-to-number-numbers/m-p/385006#M491294</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;num# isn't working for some reason as they still show up in the list box with text alignment.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Sep 2012 14:53:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Turn-text-numbers-to-number-numbers/m-p/385006#M491294</guid>
      <dc:creator />
      <dc:date>2012-09-06T14:53:38Z</dc:date>
    </item>
    <item>
      <title>Re: Turn text numbers to number numbers</title>
      <link>https://community.qlik.com/t5/QlikView/Turn-text-numbers-to-number-numbers/m-p/385007#M491295</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you copy and paste the table as an example?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Sep 2012 14:54:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Turn-text-numbers-to-number-numbers/m-p/385007#M491295</guid>
      <dc:creator />
      <dc:date>2012-09-06T14:54:34Z</dc:date>
    </item>
    <item>
      <title>Re: Turn text numbers to number numbers</title>
      <link>https://community.qlik.com/t5/QlikView/Turn-text-numbers-to-number-numbers/m-p/385008#M491296</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="background-color: #eef4f9; font-size: 12px; color: #636363; font-family: Arial;"&gt;I go from:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="background-color: #eef4f9; font-size: 12px; color: #636363; font-family: Arial;"&gt;(4302)&lt;/P&gt;&lt;P style="background-color: #eef4f9; font-size: 12px; color: #636363; font-family: Arial;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 5069&lt;/P&gt;&lt;P style="background-color: #eef4f9; font-size: 12px; color: #636363; font-family: Arial;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 7869&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="background-color: #eef4f9; font-size: 12px; color: #636363; font-family: Arial;"&gt;to:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="background-color: #eef4f9; font-size: 12px; color: #636363; font-family: Arial;"&gt;-4302&lt;/P&gt;&lt;P style="background-color: #eef4f9; font-size: 12px; color: #636363; font-family: Arial;"&gt;&amp;nbsp;&amp;nbsp; 5069&lt;/P&gt;&lt;P style="background-color: #eef4f9; font-size: 12px; color: #636363; font-family: Arial;"&gt;&amp;nbsp;&amp;nbsp; 7869&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="background-color: #eef4f9; font-size: 12px; color: #636363; font-family: Arial;"&gt;The code I used in the script to convert the field:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="background-color: #eef4f9; font-size: 12px; color: #636363; font-family: Arial;"&gt;&lt;SPAN style="color: #636363; font-family: Arial; font-size: 12px; background-color: #ffffff;"&gt;Num#(replace(replace(NumTextField, '(', '-'), ')', ''))&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Sep 2012 14:59:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Turn-text-numbers-to-number-numbers/m-p/385008#M491296</guid>
      <dc:creator />
      <dc:date>2012-09-06T14:59:30Z</dc:date>
    </item>
    <item>
      <title>Re: Turn text numbers to number numbers</title>
      <link>https://community.qlik.com/t5/QlikView/Turn-text-numbers-to-number-numbers/m-p/385009#M491297</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;&lt;/P&gt;&lt;P style="background-color: #eef4f9; font-size: 12px; color: #636363; font-family: Arial;"&gt;&lt;SPAN style="color: #636363; font-family: Arial; font-size: 12px; background-color: #ffffff;"&gt;if(left(&lt;/SPAN&gt;&lt;SPAN style="color: #636363; font-family: Arial; font-size: 12px; background-color: #ffffff;"&gt;NumTextField,1)='(', &lt;/SPAN&gt;&lt;SPAN style="color: #636363; font-family: Arial; font-size: 12px; background-color: #ffffff;"&gt;num#(replace(replace(NumTextField, '(',''), ')', ''))*(-1),&lt;/SPAN&gt;&lt;SPAN style="color: #636363; font-family: Arial; font-size: 12px; background-color: #ffffff;"&gt;num#(replace(replace(NumTextField, '(',''), ')', '')))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="background-color: #eef4f9; font-size: 12px; color: #636363; font-family: Arial;"&gt;&lt;SPAN style="color: #636363; font-family: Arial; font-size: 12px; background-color: #ffffff;"&gt;Replaceing ( with - is still creating a string&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Sep 2012 15:02:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Turn-text-numbers-to-number-numbers/m-p/385009#M491297</guid>
      <dc:creator />
      <dc:date>2012-09-06T15:02:47Z</dc:date>
    </item>
    <item>
      <title>Re: Turn text numbers to number numbers</title>
      <link>https://community.qlik.com/t5/QlikView/Turn-text-numbers-to-number-numbers/m-p/385010#M491298</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thats still not working,&amp;nbsp; with that code it just drops the negative values.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Sep 2012 15:15:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Turn-text-numbers-to-number-numbers/m-p/385010#M491298</guid>
      <dc:creator />
      <dc:date>2012-09-06T15:15:49Z</dc:date>
    </item>
    <item>
      <title>Re: Turn text numbers to number numbers</title>
      <link>https://community.qlik.com/t5/QlikView/Turn-text-numbers-to-number-numbers/m-p/385011#M491299</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No, that code instead of adding - to the value which creates a string, it removes the parenthesis and multiply's by -1 to give it an actual negative value. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you post a sample?&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;I just tested it by inputting a string into the expression and it does exactly what is needed:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(left('(4302)',1)='(', num#(replace(replace('(4302)', '(',''), ')', ''))*(-1),num#(replace(replace('(4302)', '(',''), ')', '')))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this returns the number -4302&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Sep 2012 15:18:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Turn-text-numbers-to-number-numbers/m-p/385011#M491299</guid>
      <dc:creator />
      <dc:date>2012-09-06T15:18:22Z</dc:date>
    </item>
    <item>
      <title>Re: Turn text numbers to number numbers</title>
      <link>https://community.qlik.com/t5/QlikView/Turn-text-numbers-to-number-numbers/m-p/385012#M491300</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Heres my document&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Sep 2012 15:36:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Turn-text-numbers-to-number-numbers/m-p/385012#M491300</guid>
      <dc:creator />
      <dc:date>2012-09-06T15:36:52Z</dc:date>
    </item>
    <item>
      <title>Re: Turn text numbers to number numbers</title>
      <link>https://community.qlik.com/t5/QlikView/Turn-text-numbers-to-number-numbers/m-p/385013#M491301</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok you had some leading/trailing spaces on the field. Wrap your field name with trim() to remove these and it works fine. I tested it using the field e&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(left(trim(e),1)='(', (num(replace(replace(trim(e), '(',''), ')', ''))) * (-1),num(replace(replace(trim(e), '(',''), ')', ''))) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edit: Sometimes the easiest way to figure this out if you are not sure is to create an expression in a list box with the fomula: ='@' &amp;amp; e &amp;amp; '@'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This creates a string and will show you hidden spaces.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;@37,778.00@&lt;/P&gt;&lt;P&gt;@19,285.00@&lt;/P&gt;&lt;P&gt;@17,460.00@&lt;/P&gt;&lt;P&gt;@34,234.00@&lt;/P&gt;&lt;P&gt;@33,087.00@&lt;/P&gt;&lt;P&gt;@19,557.00@&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;@(3,412) @&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;@(83,106) @&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;@16,709.00@&lt;/P&gt;&lt;P&gt;@8,893.00@&lt;/P&gt;&lt;P&gt;@6,346.00@&lt;/P&gt;&lt;P&gt;@16,884.00@&lt;/P&gt;&lt;P&gt;@10,188.00@&lt;/P&gt;&lt;P&gt;@2,056.00@&lt;/P&gt;&lt;P&gt;@21,688.00@&lt;/P&gt;&lt;P&gt;@9,002.00@&lt;/P&gt;&lt;P&gt;@7,458.00@&lt;/P&gt;&lt;P&gt;@20,650.00@&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;@(17,338) @&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Also note that qlikview sees spaces as characters. you may not know they are there, but fields will not match up if they are the same, but one has no trailing space and one has trailing space. &lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Sep 2012 15:51:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Turn-text-numbers-to-number-numbers/m-p/385013#M491301</guid>
      <dc:creator />
      <dc:date>2012-09-06T15:51:39Z</dc:date>
    </item>
    <item>
      <title>Re: Turn text numbers to number numbers</title>
      <link>https://community.qlik.com/t5/QlikView/Turn-text-numbers-to-number-numbers/m-p/385014#M491302</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think trimming helped but you used e which I already had parsed some in the script.&amp;nbsp; I think you need to use num# before you replace and also num after you replace the '()'.&amp;nbsp; Thanks though, I got it to work from your comment!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Sep 2012 16:08:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Turn-text-numbers-to-number-numbers/m-p/385014#M491302</guid>
      <dc:creator />
      <dc:date>2012-09-06T16:08:05Z</dc:date>
    </item>
  </channel>
</rss>

