<?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: How to calculate a new number using numbers from one variable narrowed down by another? in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/How-to-calculate-a-new-number-using-numbers-from-one-variable/m-p/901642#M40198</link>
    <description>&lt;P&gt;Thiis is exactly what &lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/proc/p0jvbbqkt0gs2cn1lo4zndbqs1pe.htm" target="_self"&gt;PROC SUMMARY&lt;/A&gt;&amp;nbsp;(alias PROC MEANS) was designed to do:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc summary data=have nway;
  vars adult_pop;
  class count;
  output out=want (drop=_type_) sum=total_adult_pop;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sun, 05 Nov 2023 22:55:54 GMT</pubDate>
    <dc:creator>mkeintz</dc:creator>
    <dc:date>2023-11-05T22:55:54Z</dc:date>
    <item>
      <title>How to calculate a new number using numbers from one variable narrowed down by another?</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-calculate-a-new-number-using-numbers-from-one-variable/m-p/901639#M40196</link>
      <description>&lt;P&gt;Sorry about the complicated title. For my data (previewed below), I am looking to find the adult_pop number for each county. For example, for Rio Blanco county, I am looking for a way to ask SAS to add 4381 + 1190 + (any other adult_pop numbers for the county) and tell me the total adult_pop for the county. There are over 1,000 lines of code in the data set. What is a simple way to code this? Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2023-11-05 at 3.26.08 PM.png" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/89433i08EE24E0712DF78B/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2023-11-05 at 3.26.08 PM.png" alt="Screenshot 2023-11-05 at 3.26.08 PM.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 05 Nov 2023 22:32:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-calculate-a-new-number-using-numbers-from-one-variable/m-p/901639#M40196</guid>
      <dc:creator>BLT2023</dc:creator>
      <dc:date>2023-11-05T22:32:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate a new number using numbers from one variable narrowed down by another?</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-calculate-a-new-number-using-numbers-from-one-variable/m-p/901642#M40198</link>
      <description>&lt;P&gt;Thiis is exactly what &lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/proc/p0jvbbqkt0gs2cn1lo4zndbqs1pe.htm" target="_self"&gt;PROC SUMMARY&lt;/A&gt;&amp;nbsp;(alias PROC MEANS) was designed to do:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc summary data=have nway;
  vars adult_pop;
  class count;
  output out=want (drop=_type_) sum=total_adult_pop;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 05 Nov 2023 22:55:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-calculate-a-new-number-using-numbers-from-one-variable/m-p/901642#M40198</guid>
      <dc:creator>mkeintz</dc:creator>
      <dc:date>2023-11-05T22:55:54Z</dc:date>
    </item>
  </channel>
</rss>

