<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.appian.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Query Entity rounds large decimal and removes decimal</title><link>https://community.appian.com/discussions/f/rules/12026/query-entity-rounds-large-decimal-and-removes-decimal</link><description>I&amp;#39;ve found a query entity in our system that seems to round large decimals and remove everything after the decimal if the overall character length is eight or greater. 
 
 Example: 
 If the value is 12345678.90 the query returns 12345679. 
 
 The DB structure</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Query Entity rounds large decimal and removes decimal</title><link>https://community.appian.com/thread/53274?ContentTypeID=1</link><pubDate>Mon, 12 Mar 2018 13:24:43 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:9f8dc146-92b0-44ad-a81b-eba0ac7344aa</guid><dc:creator>Issam Dabaie</dc:creator><description>Thank you for your input, I&amp;#39;ll keep this in mind for future CDTs and data structure.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Query Entity rounds large decimal and removes decimal</title><link>https://community.appian.com/thread/53252?ContentTypeID=1</link><pubDate>Sun, 11 Mar 2018 11:06:37 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:078c4f2d-8f4e-4a1c-ac26-459149c9f300</guid><dc:creator>Dastagiri Dudekula</dc:creator><description>&lt;p&gt;Its advisable that, if you want to retain the same form of the decimal field from db, always use text field with fixed(). Please find the attached screen to observe the value 12345678.90 variations at different fields.&lt;/p&gt;
&lt;p&gt;&lt;a href="/cfs-file/__key/communityserver-discussions-components-files/15/TestNumbers.png"&gt;&lt;img src="/resized-image/__size/320x240/__key/communityserver-discussions-components-files/15/TestNumbers.png" alt=" " /&gt;&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Query Entity rounds large decimal and removes decimal</title><link>https://community.appian.com/thread/53244?ContentTypeID=1</link><pubDate>Fri, 09 Mar 2018 16:10:09 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:4554e737-7119-476c-b07b-d7cee4d297c4</guid><dc:creator>Issam Dabaie</dc:creator><description>This does seem to the case, it&amp;#39;s just displaying a rounded number.  I believe when actually used in an expression for any sort of arithmetic that it does consider the decimal and doesn&amp;#39;t round.&lt;br /&gt;
&lt;br /&gt;
I&amp;#39;ve found using fixed() helps for display issues.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Query Entity rounds large decimal and removes decimal</title><link>https://community.appian.com/thread/53243?ContentTypeID=1</link><pubDate>Fri, 09 Mar 2018 16:09:10 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:ee7faf91-03e9-4480-80fe-56c533e45b35</guid><dc:creator>Issam Dabaie</dc:creator><description>Thank you for the response.  It does seem to be mostly a display issue, which is mostly resolved by using the fixed() function.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Query Entity rounds large decimal and removes decimal</title><link>https://community.appian.com/thread/53216?ContentTypeID=1</link><pubDate>Thu, 08 Mar 2018 19:57:42 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:da58996f-b681-40bd-a370-a9d83d0ea188</guid><dc:creator>Mike Schmitt</dc:creator><description>You may want to double-check whether it&amp;#39;s truly rounding - what I&amp;#39;ve found recently is that the *displayed result* will be rounded, i.e. when converted to text for displaying, but the inherent value is still correct.  One way to check the full value is to take your result and wrap it in the text() function, i.e. text(local!value, &amp;quot;0.00&amp;quot;), to force it to render to 2 decimal places.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Query Entity rounds large decimal and removes decimal</title><link>https://community.appian.com/thread/53210?ContentTypeID=1</link><pubDate>Thu, 08 Mar 2018 19:00:51 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:7f86542d-0cd6-4fdf-9c21-a0b48803c982</guid><dc:creator>bradc</dc:creator><description>Hi Issam - I have encountered the same issue.  Appian uses IEEE 754 standard for Number (Decimal) data type, which will round the decimal in the way you&amp;#39;ve observed.  Here is a link to more information: &lt;a href="https://community.appian.com/support/w/kb/707/kb-1426-unexpected-results-on-decimal-calculations-and-rounding"&gt;community.appian.com/.../kb-1426-unexpected-results-on-decimal-calculations-and-rounding&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
The way I&amp;#39;ve gotten around this is to change the datatype to text.  Hopefully you are able to change the data type, otherwise I&amp;#39;m not sure there is a good solution.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>