<?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 do I combine multiple yearly costs so it only appears in one row in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/how-do-I-combine-multiple-yearly-costs-so-it-only-appears-in-one/m-p/914906#M360544</link>
    <description>&lt;P&gt;Exactly what I needed- thank you!&lt;/P&gt;</description>
    <pubDate>Wed, 07 Feb 2024 18:50:15 GMT</pubDate>
    <dc:creator>fa04</dc:creator>
    <dc:date>2024-02-07T18:50:15Z</dc:date>
    <item>
      <title>how do I combine multiple yearly costs so it only appears in one row</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-do-I-combine-multiple-yearly-costs-so-it-only-appears-in-one/m-p/914899#M360540</link>
      <description>&lt;P&gt;I have a four-variable dataset. Sometimes, total_cost is repeated in a fiscal_year.&amp;nbsp; I'd like to add all the costs by fiscal_year so there's only one row per org per year. Thank you!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data have;&lt;BR /&gt;length organization_name $10.;&lt;BR /&gt;input project_number organization_name fiscal_year total_cost;&lt;BR /&gt;cards;&lt;/P&gt;&lt;P&gt;1 orgA 2013 200&lt;BR /&gt;2 orgA 2014 300&lt;BR /&gt;3 orgA 2014 500&lt;BR /&gt;4 orgA 2014 200&lt;BR /&gt;5 orgB 2022 300&lt;BR /&gt;6 orgB 2022 400&lt;BR /&gt;7 orgB 2023 400&lt;BR /&gt;8 orgC 2012 200&lt;BR /&gt;9 orgC 2013 450&lt;BR /&gt;10 orgC 2013 1100&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Feb 2024 18:10:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-do-I-combine-multiple-yearly-costs-so-it-only-appears-in-one/m-p/914899#M360540</guid>
      <dc:creator>fa04</dc:creator>
      <dc:date>2024-02-07T18:10:13Z</dc:date>
    </item>
    <item>
      <title>Re: how do I combine multiple yearly costs so it only appears in one row</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-do-I-combine-multiple-yearly-costs-so-it-only-appears-in-one/m-p/914901#M360541</link>
      <description>&lt;P&gt;These types of questions, where you want to calculate some statistic (in this case the sum) for different groups, is a job for PROC SUMMARY.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
length organization_name $10.;
input project_number organization_name fiscal_year total_cost;
cards;
1 orgA 2013 200
2 orgA 2014 300
3 orgA 2014 500
4 orgA 2014 200
5 orgB 2022 300
6 orgB 2022 400
7 orgB 2023 400
8 orgC 2012 200
9 orgC 2013 450
10 orgC 2013 1100
;

proc summary data=have nway;
    class organization_name fiscal_year;
    var total_cost;
    output out=want sum=;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 07 Feb 2024 18:29:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-do-I-combine-multiple-yearly-costs-so-it-only-appears-in-one/m-p/914901#M360541</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2024-02-07T18:29:32Z</dc:date>
    </item>
    <item>
      <title>Re: how do I combine multiple yearly costs so it only appears in one row</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-do-I-combine-multiple-yearly-costs-so-it-only-appears-in-one/m-p/914906#M360544</link>
      <description>&lt;P&gt;Exactly what I needed- thank you!&lt;/P&gt;</description>
      <pubDate>Wed, 07 Feb 2024 18:50:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-do-I-combine-multiple-yearly-costs-so-it-only-appears-in-one/m-p/914906#M360544</guid>
      <dc:creator>fa04</dc:creator>
      <dc:date>2024-02-07T18:50:15Z</dc:date>
    </item>
  </channel>
</rss>

