<?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: Num () question in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Num-question/m-p/607684#M224355</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;You can round numbers with 2 decimals in your object :&amp;nbsp; Round(NumericField,0.01) then display numbers naturally.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 07 May 2014 13:16:30 GMT</pubDate>
    <dc:creator />
    <dc:date>2014-05-07T13:16:30Z</dc:date>
    <item>
      <title>Num () question</title>
      <link>https://community.qlik.com/t5/QlikView/Num-question/m-p/607682#M224353</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have some data that has been created using SUM (). Some of it is integer, some of it is not. I would like integers displayed without decimal places. But I would like the data that contains decimal places to stop at 2 dp. e.g. Data of&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1&lt;/P&gt;&lt;P&gt;2&lt;/P&gt;&lt;P&gt;3.45678&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;would display as&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1&lt;/P&gt;&lt;P&gt;2&lt;/P&gt;&lt;P&gt;3.46&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I just display the data, I get&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1&lt;/P&gt;&lt;P&gt;2&lt;/P&gt;&lt;P&gt;3.45678&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I use the NUM function (ie NUM (&amp;lt;field&amp;gt;, '#,##'), I get&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1.00&lt;/P&gt;&lt;P&gt;2.00&lt;/P&gt;&lt;P&gt;3.46&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does anyone know what I am doing wrong with NUM ? My understanding was that the use of the hash meant the decimal places were flexible and would not appear if they weren't there but they are appearing.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 May 2014 13:06:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Num-question/m-p/607682#M224353</guid>
      <dc:creator>devans_1</dc:creator>
      <dc:date>2014-05-07T13:06:28Z</dc:date>
    </item>
    <item>
      <title>Re: Num () question</title>
      <link>https://community.qlik.com/t5/QlikView/Num-question/m-p/607683#M224354</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi David,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your function is fine, format is applied to all data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-JFlorian&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 May 2014 13:16:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Num-question/m-p/607683#M224354</guid>
      <dc:creator>javier_florian</dc:creator>
      <dc:date>2014-05-07T13:16:20Z</dc:date>
    </item>
    <item>
      <title>Re: Num () question</title>
      <link>https://community.qlik.com/t5/QlikView/Num-question/m-p/607684#M224355</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;You can round numbers with 2 decimals in your object :&amp;nbsp; Round(NumericField,0.01) then display numbers naturally.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 May 2014 13:16:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Num-question/m-p/607684#M224355</guid>
      <dc:creator />
      <dc:date>2014-05-07T13:16:30Z</dc:date>
    </item>
    <item>
      <title>Re: Num () question</title>
      <link>https://community.qlik.com/t5/QlikView/Num-question/m-p/607685#M224356</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;Try below&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;num(Num,'#######,###.##')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;ASHFAQ&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 May 2014 13:17:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Num-question/m-p/607685#M224356</guid>
      <dc:creator>ashfaq_haseeb</dc:creator>
      <dc:date>2014-05-07T13:17:22Z</dc:date>
    </item>
    <item>
      <title>Re: Num () question</title>
      <link>https://community.qlik.com/t5/QlikView/Num-question/m-p/607686#M224357</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;num function will format all the numeric values in that field/column to the format you specify.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 May 2014 13:17:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Num-question/m-p/607686#M224357</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-05-07T13:17:29Z</dc:date>
    </item>
    <item>
      <title>Re: Num () question</title>
      <link>https://community.qlik.com/t5/QlikView/Num-question/m-p/607687#M224358</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Did you set any Number format under Number tab of Object properties?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 May 2014 13:21:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Num-question/m-p/607687#M224358</guid>
      <dc:creator />
      <dc:date>2014-05-07T13:21:30Z</dc:date>
    </item>
    <item>
      <title>Re: Num () question</title>
      <link>https://community.qlik.com/t5/QlikView/Num-question/m-p/607688#M224359</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi David,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try this expression&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(Subfield(&amp;lt;field&amp;gt;,'.',2)&amp;gt;0,Num(&amp;lt;field&amp;gt;,'#.00'),&amp;lt;field&amp;gt;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Rajat&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 May 2014 13:24:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Num-question/m-p/607688#M224359</guid>
      <dc:creator>rajat2392</dc:creator>
      <dc:date>2014-05-07T13:24:55Z</dc:date>
    </item>
    <item>
      <title>Re: Num () question</title>
      <link>https://community.qlik.com/t5/QlikView/Num-question/m-p/607689#M224360</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for your replies. I realise that the format is applied to all values in the column - it's just that I am trying to find the correct format that will remove trailing decimal places.&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #008000; font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;num (NUM, '#######,###.##')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;unfortunately produces the same results as my initial problem. I have considered ROUND and may have to go down this route. It's not perfect as ROUND also adds decimal places when they are not required but if used earlier in the script and then later summed, unecessary trailing dps are removed.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 May 2014 13:30:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Num-question/m-p/607689#M224360</guid>
      <dc:creator>devans_1</dc:creator>
      <dc:date>2014-05-07T13:30:37Z</dc:date>
    </item>
    <item>
      <title>Re: Num () question</title>
      <link>https://community.qlik.com/t5/QlikView/Num-question/m-p/607690#M224361</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have tried changing the number format but this just places trailing zeroes. Rajat's answer would work but i smessy because I have to apply it to 12 different complicated expressions. I think ROUND is the best answer to go with.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for all your help. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 May 2014 13:35:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Num-question/m-p/607690#M224361</guid>
      <dc:creator>devans_1</dc:creator>
      <dc:date>2014-05-07T13:35:15Z</dc:date>
    </item>
    <item>
      <title>Re: Num () question</title>
      <link>https://community.qlik.com/t5/QlikView/Num-question/m-p/607691#M224362</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try to load your table like below script if you want a digit number 1.345 to be 1.34 or 2.145 to be 2.14 or 3.45678 to be 3.45 then try to load like below table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD *,Num(SubField(Number,'.',1)&amp;amp;'.'&amp;amp;Left( SubField(Number,'.',-1),2)) as NewNumber;&lt;/P&gt;&lt;P&gt;LOAD * Inline&lt;/P&gt;&lt;P&gt;[&lt;/P&gt;&lt;P&gt;Number&lt;/P&gt;&lt;P&gt;1.345&lt;/P&gt;&lt;P&gt;2.145&lt;/P&gt;&lt;P&gt;3.45678&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OutPut will be&lt;/P&gt;&lt;P&gt;==========&lt;/P&gt;&lt;P&gt;1.34&lt;/P&gt;&lt;P&gt;2.14&lt;/P&gt;&lt;P&gt;3.45&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 May 2014 13:43:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Num-question/m-p/607691#M224362</guid>
      <dc:creator>its_anandrjs</dc:creator>
      <dc:date>2014-05-07T13:43:42Z</dc:date>
    </item>
    <item>
      <title>Re: Num () question</title>
      <link>https://community.qlik.com/t5/QlikView/Num-question/m-p/607692#M224363</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12px;"&gt;NUM (&amp;lt;field&amp;gt;, '#,##') , This format works, but don't set any number setting (dont override document settings)on the chart for this field.&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: 12px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 May 2014 13:46:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Num-question/m-p/607692#M224363</guid>
      <dc:creator />
      <dc:date>2014-05-07T13:46:31Z</dc:date>
    </item>
    <item>
      <title>Re: Num () question</title>
      <link>https://community.qlik.com/t5/QlikView/Num-question/m-p/607693#M224364</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;My recommendation is to avoid using text function like Subfield(), since text operations are significantly slower in performance than numerical operations. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With Frac() it is possible to remove the integer part from a value, and if the decimal part is not 0 then the value is a decimal value and should be rounded.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Notice that Round() will adapt both the visible value and the underlying value, while Num() will keep the underlying decimal value and just adapt the visual value. So the selected function to adapt the value depends on what precision you want to have on calculations.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD &lt;/P&gt;&lt;P&gt;&amp;nbsp; If(Frac(F1)&amp;lt;&amp;gt;0,Round(F1,'0.01'),F1) AS F1&lt;/P&gt;&lt;P&gt;Inline [&lt;/P&gt;&lt;P&gt;F1&lt;/P&gt;&lt;P&gt;1&lt;/P&gt;&lt;P&gt;2&lt;/P&gt;&lt;P&gt;3.45678&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 May 2014 15:08:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Num-question/m-p/607693#M224364</guid>
      <dc:creator>ToniKautto</dc:creator>
      <dc:date>2014-05-07T15:08:08Z</dc:date>
    </item>
    <item>
      <title>Re: Num () question</title>
      <link>https://community.qlik.com/t5/QlikView/Num-question/m-p/607694#M224365</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;Try this,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=if(len(fmod(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;field&lt;/SPAN&gt;,10))&amp;gt;1,num(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;field&lt;/SPAN&gt;,'##.##'),num(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;field&lt;/SPAN&gt;,''))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 May 2014 15:22:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Num-question/m-p/607694#M224365</guid>
      <dc:creator>PrashantSangle</dc:creator>
      <dc:date>2014-05-07T15:22:26Z</dc:date>
    </item>
    <item>
      <title>Re: Num () question</title>
      <link>https://community.qlik.com/t5/QlikView/Num-question/m-p/607695#M224366</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Otherwise you can simply try with&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Num(YourFieldHere,'##.##') as NewNum;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 May 2014 15:28:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Num-question/m-p/607695#M224366</guid>
      <dc:creator>its_anandrjs</dc:creator>
      <dc:date>2014-05-07T15:28:50Z</dc:date>
    </item>
  </channel>
</rss>

