<?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: Rounding up number in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Rounding-up-number/m-p/779858#M248429</link>
    <description>&lt;P&gt;Is there a typo in your question?&amp;nbsp; Did you mean 27.40 ?&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;You can use the ROUND() function to round to closest multiple of any number.&amp;nbsp; So using ROUND(x,0.01) will round your example to 27.40.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Do you want to always round up?&amp;nbsp; So that values between 27.390 and 27.395, exclusive, will also&amp;nbsp; round to 27.40 instead of 27.39?&amp;nbsp; Try CEIL(x*100)/100.&lt;/P&gt;</description>
    <pubDate>Thu, 11 Nov 2021 21:21:17 GMT</pubDate>
    <dc:creator>Tom</dc:creator>
    <dc:date>2021-11-11T21:21:17Z</dc:date>
    <item>
      <title>Rounding up number</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Rounding-up-number/m-p/779856#M248427</link>
      <description>How to round down a number by 2 decimal point. For example I have the value of x= 27.396326559 . How to round this value to x=27.44&lt;BR /&gt;&lt;BR /&gt;Many thanks&lt;BR /&gt;</description>
      <pubDate>Thu, 11 Nov 2021 20:55:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Rounding-up-number/m-p/779856#M248427</guid>
      <dc:creator>unnati</dc:creator>
      <dc:date>2021-11-11T20:55:44Z</dc:date>
    </item>
    <item>
      <title>Re: Rounding up number</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Rounding-up-number/m-p/779857#M248428</link>
      <description>&lt;P&gt;Is that a typo? Do you want 27.4 or 27.44?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Why does your title ask about rounding up and your text talk about rounding down (even though it seems you are rounding up)?&lt;/P&gt;</description>
      <pubDate>Thu, 11 Nov 2021 21:17:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Rounding-up-number/m-p/779857#M248428</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2021-11-11T21:17:47Z</dc:date>
    </item>
    <item>
      <title>Re: Rounding up number</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Rounding-up-number/m-p/779858#M248429</link>
      <description>&lt;P&gt;Is there a typo in your question?&amp;nbsp; Did you mean 27.40 ?&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;You can use the ROUND() function to round to closest multiple of any number.&amp;nbsp; So using ROUND(x,0.01) will round your example to 27.40.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Do you want to always round up?&amp;nbsp; So that values between 27.390 and 27.395, exclusive, will also&amp;nbsp; round to 27.40 instead of 27.39?&amp;nbsp; Try CEIL(x*100)/100.&lt;/P&gt;</description>
      <pubDate>Thu, 11 Nov 2021 21:21:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Rounding-up-number/m-p/779858#M248429</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2021-11-11T21:21:17Z</dc:date>
    </item>
    <item>
      <title>Re: Rounding up number</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Rounding-up-number/m-p/779859#M248430</link>
      <description>Yes. I want to round up. In your solution you round up to 27.40. Is it possible to round up it to 27.44 for value mentioned in question ?? I think 27.44 is error but need second opinion .</description>
      <pubDate>Thu, 11 Nov 2021 21:27:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Rounding-up-number/m-p/779859#M248430</guid>
      <dc:creator>unnati</dc:creator>
      <dc:date>2021-11-11T21:27:32Z</dc:date>
    </item>
    <item>
      <title>Re: Rounding up number</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Rounding-up-number/m-p/779866#M248433</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/3676"&gt;@unnati&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;Yes. I want to round up. In your solution you round up to 27.40. Is it possible to round up it to 27.44 for value mentioned in question ?? I think 27.44 is error but need second opinion .&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Round up gives you 27.4. The words "round up" do not seem to me to ever have the interpretation that you want to "round up"&amp;nbsp;27.396326559 to get 27.44.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm sure you could invent some rules that turn 27.396326559 into 27.44, but without such rules, it doesn't fit the clearly understood meaning of "round up".&lt;/P&gt;</description>
      <pubDate>Thu, 11 Nov 2021 22:18:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Rounding-up-number/m-p/779866#M248433</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2021-11-11T22:18:53Z</dc:date>
    </item>
    <item>
      <title>Re: Rounding up number</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Rounding-up-number/m-p/779873#M248436</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/3676"&gt;@unnati&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;How to round down a number by 2 decimal point. For example I have the value of x= 27.396326559 . How to round this value to x=27.44&lt;BR /&gt;&lt;BR /&gt;Many thanks&lt;BR /&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Is this the ONLY value you need to change or are there many? Your result is very atypical of "rounding" and if you have multiple values that are not actually rounding like this then we need other examples.&lt;/P&gt;
&lt;P&gt;If this is the &lt;STRONG&gt;only &lt;/STRONG&gt;value that needs to change then&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;if x = 27.396326559 then x=27.44;&lt;/P&gt;
&lt;P&gt;might be the approach.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Otherwise describe your rules in more detail. Typically rounding that value to 2 decimals would be 27.40 (rounded to nearest 0.01). Your result looks a lot like some very old very lazy coding that would add 0.05 to every thing and then truncate digits. But that isn't really rounding and when used would have been the approach to round to &lt;STRONG&gt;one&lt;/STRONG&gt; decimal place, i.e. 27.4.&lt;/P&gt;</description>
      <pubDate>Thu, 11 Nov 2021 22:45:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Rounding-up-number/m-p/779873#M248436</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2021-11-11T22:45:29Z</dc:date>
    </item>
    <item>
      <title>Re: Rounding up number</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Rounding-up-number/m-p/779885#M248442</link>
      <description>There are no logical/systematic rules that would round 27.3963 to 27.44 so the rules to do so are custom rules. You would need to tell us what those rules are how and how that conversion would work for us to code that. I mean I can make it but not using any round/floor/ceiling function.</description>
      <pubDate>Fri, 12 Nov 2021 01:08:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Rounding-up-number/m-p/779885#M248442</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2021-11-12T01:08:45Z</dc:date>
    </item>
  </channel>
</rss>

