<?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: Divide by 100% in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Divide-by-100/m-p/683913#M36981</link>
    <description>&lt;P&gt;What I'm expecting is 10.4/.9 = 11.56 - and i get this no problems if the penetration rate is less than 100%&lt;/P&gt;
&lt;P&gt;when the PenetrationRate=1 (aka 100%)&lt;/P&gt;
&lt;P&gt;10.4/1 = 10.4 and instead i'm getting 104&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;PenetrationRate is importing as&amp;nbsp;char(4) format=$4. &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;TotalDollars is importing as&amp;nbsp;char(8) format=$8.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;So are you saying i should do this?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;(input(TotalDollars,Dollar15.10)/input(PenetrationRate,12.1))&amp;nbsp; as TotalToBeConsidered&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Even with this i get a *10 output.&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 15 Sep 2020 10:45:31 GMT</pubDate>
    <dc:creator>SVoldrich</dc:creator>
    <dc:date>2020-09-15T10:45:31Z</dc:date>
    <item>
      <title>Divide by 100%</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Divide-by-100/m-p/683782#M36978</link>
      <description>&lt;P&gt;Hi!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My dataset has 2 values - TotalDollars and PennetrationRate. To get a total $ of all to be considered, I'm having sas do this formula in the proc sql&lt;/P&gt;
&lt;P&gt;TotalDollars / PennetrationRate as TotalToBeConsidered.&lt;/P&gt;
&lt;P&gt;What I'm expecting is 10.4/.9 = 11.56 - and i get this no problems if the pennetration rate is less than 100%&lt;/P&gt;
&lt;P&gt;when the PennetrationRate=1 (aka 100%)&lt;/P&gt;
&lt;P&gt;10.4/1 = 10.4 and instead i'm getting 104&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Importing from excel.&amp;nbsp;&lt;BR /&gt;PennetrationRate is importing as&amp;nbsp;char(4) format=$4. TotalDollars is importing as&amp;nbsp;char(8) format=$8.&lt;/P&gt;
&lt;P&gt;in the raw data the Pennetration rate looks like 1.&lt;BR /&gt;i'm using input in the formula.&lt;/P&gt;
&lt;P&gt;(input(TotalDollars,Dollar15.10)/input(PennetrationRate,PERCENT12.1))&amp;nbsp; as TotalToBeConsidered&lt;/P&gt;
&lt;P&gt;I've also tried with&amp;nbsp;&lt;/P&gt;
&lt;P&gt;(input(TotalDollars,Dollar15.10)/input(PennetrationRate,BEST12.1))&amp;nbsp; as TotalToBeConsidered&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Get the same result of *10.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any thoughts as to why it's doing that?&lt;/P&gt;
&lt;P&gt;works beautifully on anything other than 100%&lt;/P&gt;</description>
      <pubDate>Mon, 14 Sep 2020 21:24:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Divide-by-100/m-p/683782#M36978</guid>
      <dc:creator>SVoldrich</dc:creator>
      <dc:date>2020-09-14T21:24:41Z</dc:date>
    </item>
    <item>
      <title>Re: Divide by 100%</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Divide-by-100/m-p/683787#M36979</link>
      <description>&lt;P&gt;Please show some explicit values.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Almost certainly you should not be using a decimal portion when importing with PERCENT.&lt;/P&gt;
&lt;P&gt;Please run this code and examine the result.&lt;/P&gt;
&lt;PRE&gt;data example;
   input z $;
   p = input (z,percent12.1);&lt;BR /&gt;   p2 = input(z,percent12.);
datalines;
%100
%96
%5
;&lt;/PRE&gt;
&lt;P&gt;The numeric "percent" value for p on the first line ends up as 0.1, not 1.&lt;/P&gt;
&lt;P&gt;When you use a format like percent12.1 then you are forcing the value to be read with a decimal inserted into the string before conversion. This is an IMPLIED decimal, meaning you may well have told SAS to treat the value as smaller than you think. So instead of dividing by 1 you are actually dividing by .1.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 14 Sep 2020 21:44:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Divide-by-100/m-p/683787#M36979</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2020-09-14T21:44:08Z</dc:date>
    </item>
    <item>
      <title>Re: Divide by 100%</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Divide-by-100/m-p/683913#M36981</link>
      <description>&lt;P&gt;What I'm expecting is 10.4/.9 = 11.56 - and i get this no problems if the penetration rate is less than 100%&lt;/P&gt;
&lt;P&gt;when the PenetrationRate=1 (aka 100%)&lt;/P&gt;
&lt;P&gt;10.4/1 = 10.4 and instead i'm getting 104&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;PenetrationRate is importing as&amp;nbsp;char(4) format=$4. &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;TotalDollars is importing as&amp;nbsp;char(8) format=$8.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;So are you saying i should do this?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;(input(TotalDollars,Dollar15.10)/input(PenetrationRate,12.1))&amp;nbsp; as TotalToBeConsidered&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Even with this i get a *10 output.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 15 Sep 2020 10:45:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Divide-by-100/m-p/683913#M36981</guid>
      <dc:creator>SVoldrich</dc:creator>
      <dc:date>2020-09-15T10:45:31Z</dc:date>
    </item>
    <item>
      <title>Re: Divide by 100%</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Divide-by-100/m-p/683918#M36983</link>
      <description>&lt;P&gt;This solves it.&lt;/P&gt;
&lt;P&gt;PenetrationRate is importing as&amp;nbsp;char(4) format=$4.&lt;/P&gt;
&lt;P&gt;TotalDollars is importing as&amp;nbsp;char(8) format=$8.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="arial black,avant garde" color="#FF0000"&gt;&lt;SPAN&gt;(input(TotalDollars,Dollar15.10)/input(PenetrationRate,Comma32.))&amp;nbsp; as TotalToBeConsidered&amp;nbsp;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What I'm expecting is 10.4/.9 = 11.56&amp;nbsp; if the penetration rate is less than 100%&lt;/P&gt;
&lt;P&gt;10.4/1 = 10.4 if the penetration rate is 1.&lt;/P&gt;</description>
      <pubDate>Tue, 15 Sep 2020 11:03:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Divide-by-100/m-p/683918#M36983</guid>
      <dc:creator>SVoldrich</dc:creator>
      <dc:date>2020-09-15T11:03:38Z</dc:date>
    </item>
  </channel>
</rss>

