<?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: fill the nulls of a column with the mean sum of the division of two columns multiplied by one co in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/fill-the-nulls-of-a-column-with-the-mean-sum-of-the-division-of/m-p/856143#M338304</link>
    <description>&lt;P&gt;The code I gave in my other thread should be easily modified to handle this change. Please look at the code in my other thread, then try it and finally see if you can modify it to make it handle this change.&lt;/P&gt;</description>
    <pubDate>Sun, 29 Jan 2023 18:04:09 GMT</pubDate>
    <dc:creator>PaigeMiller</dc:creator>
    <dc:date>2023-01-29T18:04:09Z</dc:date>
    <item>
      <title>fill the nulls of a column with the mean sum of the division of two columns multiplied by one column</title>
      <link>https://communities.sas.com/t5/SAS-Programming/fill-the-nulls-of-a-column-with-the-mean-sum-of-the-division-of/m-p/856135#M338301</link>
      <description>&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;P&gt;I need to&amp;nbsp;fill&amp;nbsp;the nulls of a column with the mean sum of the division of two columns multiplied by one column and rest the previous An example would be&lt;/P&gt;&lt;PRE class=""&gt;&lt;CODE class=""&gt;A B_01 B_02 ... B_60
&lt;SPAN class=""&gt;5&lt;/SPAN&gt;  .    .
&lt;SPAN class=""&gt;5&lt;/SPAN&gt;  &lt;SPAN class=""&gt;2&lt;/SPAN&gt;    &lt;SPAN class=""&gt;3&lt;/SPAN&gt;
&lt;SPAN class=""&gt;7&lt;/SPAN&gt;  &lt;SPAN class=""&gt;3&lt;/SPAN&gt;   &lt;SPAN class=""&gt;1&lt;/SPAN&gt;,&lt;SPAN class=""&gt;2&lt;/SPAN&gt;
&lt;SPAN class=""&gt;9&lt;/SPAN&gt;  &lt;SPAN class=""&gt;3&lt;/SPAN&gt;   &lt;SPAN class=""&gt;0&lt;/SPAN&gt;,&lt;SPAN class=""&gt;3&lt;/SPAN&gt;
&lt;SPAN class=""&gt;4&lt;/SPAN&gt;  .    .&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Well, I would like the missing value for column B_01 to be (2/5 + 3/7 + 3/9) / 3&amp;nbsp;* its corresponding column A For column B_02(3/5 + 1,2/7 + 0,3/9)/3 * its corresponding column A - his new value in B_01&lt;/P&gt;&lt;P&gt;I have thought about doing this, but it turns out that I have 60 columns with which to do it and&amp;nbsp;the only way it comes to mi mind is to do this 60 times.&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;PRE class=""&gt;&lt;CODE class=""&gt;Proc &lt;SPAN class=""&gt;sql&lt;/SPAN&gt;;
  &lt;SPAN class=""&gt;create&lt;/SPAN&gt; &lt;SPAN class=""&gt;table&lt;/SPAN&gt; &lt;SPAN class=""&gt;new&lt;/SPAN&gt; &lt;SPAN class=""&gt;as&lt;/SPAN&gt;
  &lt;SPAN class=""&gt;Select&lt;/SPAN&gt; &lt;SPAN class=""&gt;*&lt;/SPAN&gt;
  , &lt;SPAN class=""&gt;sum&lt;/SPAN&gt;(B_01&lt;SPAN class=""&gt;/&lt;/SPAN&gt;A)&lt;SPAN class=""&gt;/&lt;/SPAN&gt;&lt;SPAN class=""&gt;sum&lt;/SPAN&gt;(&lt;SPAN class=""&gt;case&lt;/SPAN&gt; &lt;SPAN class=""&gt;when&lt;/SPAN&gt; B_01 &lt;SPAN class=""&gt;is&lt;/SPAN&gt; missimg &lt;SPAN class=""&gt;then&lt;/SPAN&gt; . &lt;SPAN class=""&gt;else&lt;/SPAN&gt; &lt;SPAN class=""&gt;1&lt;/SPAN&gt;)&lt;SPAN class=""&gt;*&lt;/SPAN&gt;A &lt;SPAN class=""&gt;end&lt;/SPAN&gt; &lt;SPAN class=""&gt;as&lt;/SPAN&gt; new_B_01
  ,&amp;nbsp;&lt;SPAN class=""&gt;sum&lt;/SPAN&gt;(B_02&lt;SPAN class=""&gt;/&lt;/SPAN&gt;A)&lt;SPAN class=""&gt;/&lt;/SPAN&gt;&lt;SPAN class=""&gt;sum&lt;/SPAN&gt;(&lt;SPAN class=""&gt;case&lt;/SPAN&gt; &lt;SPAN class=""&gt;when&lt;/SPAN&gt; B_02 &lt;SPAN class=""&gt;is&lt;/SPAN&gt; missimg &lt;SPAN class=""&gt;then&lt;/SPAN&gt; . &lt;SPAN class=""&gt;else&lt;/SPAN&gt; &lt;SPAN class=""&gt;1&lt;/SPAN&gt;)&lt;SPAN class=""&gt;*&lt;/SPAN&gt;A&lt;SPAN class=""&gt;-&lt;/SPAN&gt;B_01 &lt;SPAN class=""&gt;end&lt;/SPAN&gt; &lt;SPAN class=""&gt;as&lt;/SPAN&gt; new_B_02
  &lt;SPAN class=""&gt;from&lt;/SPAN&gt; table_one
  ;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Sun, 29 Jan 2023 13:05:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/fill-the-nulls-of-a-column-with-the-mean-sum-of-the-division-of/m-p/856135#M338301</guid>
      <dc:creator>alfonsomorenom</dc:creator>
      <dc:date>2023-01-29T13:05:37Z</dc:date>
    </item>
    <item>
      <title>Re: fill the nulls of a column with the mean sum of the division of two columns multiplied by one co</title>
      <link>https://communities.sas.com/t5/SAS-Programming/fill-the-nulls-of-a-column-with-the-mean-sum-of-the-division-of/m-p/856139#M338302</link>
      <description>&lt;P&gt;I provided a possible answer in your &lt;A href="https://communities.sas.com/t5/SAS-Programming/fill-the-nulls-of-a-column-with-the-mean-sum-of-the-division-of/td-p/856119/jump-to/first-unread-message" target="_self"&gt;other thread&lt;/A&gt;. Please do not post the same question more than once.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;ALL REPLIES should be posted at &lt;A href="https://communities.sas.com/t5/SAS-Programming/fill-the-nulls-of-a-column-with-the-mean-sum-of-the-division-of/td-p/856119/jump-to/first-unread-message" target="_blank"&gt;https://communities.sas.com/t5/SAS-Programming/fill-the-nulls-of-a-column-with-the-mean-sum-of-the-division-of/td-p/856119/jump-to/first-unread-message&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 29 Jan 2023 13:32:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/fill-the-nulls-of-a-column-with-the-mean-sum-of-the-division-of/m-p/856139#M338302</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2023-01-29T13:32:48Z</dc:date>
    </item>
    <item>
      <title>Re: fill the nulls of a column with the mean sum of the division of two columns multiplied by one co</title>
      <link>https://communities.sas.com/t5/SAS-Programming/fill-the-nulls-of-a-column-with-the-mean-sum-of-the-division-of/m-p/856142#M338303</link>
      <description>&lt;P&gt;Sorry but I have changed the question. Should I delete the old question?&lt;/P&gt;</description>
      <pubDate>Sun, 29 Jan 2023 14:04:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/fill-the-nulls-of-a-column-with-the-mean-sum-of-the-division-of/m-p/856142#M338303</guid>
      <dc:creator>alfonsomorenom</dc:creator>
      <dc:date>2023-01-29T14:04:30Z</dc:date>
    </item>
    <item>
      <title>Re: fill the nulls of a column with the mean sum of the division of two columns multiplied by one co</title>
      <link>https://communities.sas.com/t5/SAS-Programming/fill-the-nulls-of-a-column-with-the-mean-sum-of-the-division-of/m-p/856143#M338304</link>
      <description>&lt;P&gt;The code I gave in my other thread should be easily modified to handle this change. Please look at the code in my other thread, then try it and finally see if you can modify it to make it handle this change.&lt;/P&gt;</description>
      <pubDate>Sun, 29 Jan 2023 18:04:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/fill-the-nulls-of-a-column-with-the-mean-sum-of-the-division-of/m-p/856143#M338304</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2023-01-29T18:04:09Z</dc:date>
    </item>
  </channel>
</rss>

