<?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 How to format decimal fields in script in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/How-to-format-decimal-fields-in-script/m-p/1315968#M618354</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a few decimal fields from a SQL table that I need to format in the script.&amp;nbsp; The user does not want to see the decimals where the value is a round number.&amp;nbsp; For example, currently a value displays as 100.00 and the user wants to see 100.&amp;nbsp; However, if the value is 123.45, then I need it to display as 123.45.&amp;nbsp; Can I handle this in the script or do I do it on the report?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 25 Apr 2017 15:07:56 GMT</pubDate>
    <dc:creator>cliff_clayman</dc:creator>
    <dc:date>2017-04-25T15:07:56Z</dc:date>
    <item>
      <title>How to format decimal fields in script</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-format-decimal-fields-in-script/m-p/1315968#M618354</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a few decimal fields from a SQL table that I need to format in the script.&amp;nbsp; The user does not want to see the decimals where the value is a round number.&amp;nbsp; For example, currently a value displays as 100.00 and the user wants to see 100.&amp;nbsp; However, if the value is 123.45, then I need it to display as 123.45.&amp;nbsp; Can I handle this in the script or do I do it on the report?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Apr 2017 15:07:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-format-decimal-fields-in-script/m-p/1315968#M618354</guid>
      <dc:creator>cliff_clayman</dc:creator>
      <dc:date>2017-04-25T15:07:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to format decimal fields in script</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-format-decimal-fields-in-script/m-p/1315969#M618355</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, We can achieve where you want. Would you provide real data to look &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Apr 2017 16:28:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-format-decimal-fields-in-script/m-p/1315969#M618355</guid>
      <dc:creator>Anil_Babu_Samineni</dc:creator>
      <dc:date>2017-04-25T16:28:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to format decimal fields in script</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-format-decimal-fields-in-script/m-p/1315970#M618356</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use the same solution as mentioned here: &lt;A href="https://community.qlik.com/thread/258260"&gt;How to format decimals using a format pattern on a report&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Apr 2017 16:34:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-format-decimal-fields-in-script/m-p/1315970#M618356</guid>
      <dc:creator>Peter_Cammaert</dc:creator>
      <dc:date>2017-04-25T16:34:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to format decimal fields in script</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-format-decimal-fields-in-script/m-p/1315971#M618357</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hows your SQL decimal field values come through. Are they always two digits after decimal. May be you can try like:&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; IF(Subfield(Values, '.',2) = 0, Round(Values), Values) AS FormattedField&lt;/P&gt;&lt;P&gt;FROM yoursource;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Apr 2017 16:38:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-format-decimal-fields-in-script/m-p/1315971#M618357</guid>
      <dc:creator>vishsaggi</dc:creator>
      <dc:date>2017-04-25T16:38:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to format decimal fields in script</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-format-decimal-fields-in-script/m-p/1315972#M618358</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can try Num as suggested above in script as well - &lt;/P&gt;&lt;P&gt;Load ID,Num(Value);&lt;/P&gt;&lt;P&gt;Load * inline [&lt;/P&gt;&lt;P&gt;ID, Value&lt;/P&gt;&lt;P&gt;1, 100.00&lt;/P&gt;&lt;P&gt;2, 100.45&lt;/P&gt;&lt;P&gt;3, 90.00&lt;/P&gt;&lt;P&gt;4, 90.10 ];&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/161182_Capture.PNG" style="height: 278px; width: 620px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Apr 2017 16:42:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-format-decimal-fields-in-script/m-p/1315972#M618358</guid>
      <dc:creator>Digvijay_Singh</dc:creator>
      <dc:date>2017-04-25T16:42:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to format decimal fields in script</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-format-decimal-fields-in-script/m-p/1315973#M618359</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Missed to rename value field - &lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Load ID,Num(Value) as Value;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Load * inline [&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;ID, Value&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;1, 100.00&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;2, 100.45&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;3, 90.00&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;4, 90.10 ];&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Apr 2017 16:44:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-format-decimal-fields-in-script/m-p/1315973#M618359</guid>
      <dc:creator>Digvijay_Singh</dc:creator>
      <dc:date>2017-04-25T16:44:05Z</dc:date>
    </item>
  </channel>
</rss>

