<?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 Counting dataset entries by two different variables in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Counting-dataset-entries-by-two-different-variables/m-p/698239#M213520</link>
    <description>&lt;P&gt;SAS 9.4&lt;/P&gt;&lt;P&gt;I have a dataset of car crashes in Texas for each county and each month (each entry is a crash). I want to count each entry for each county/month combo to get the monthly crash total per county. So far I've tried PROC SQL and it mixed counties or months depending on how I set it up. There are 254 counties in Texas so using specific if functions is an unappealing option as well.&lt;/P&gt;&lt;P&gt;This is the PROC SQL function I tried&lt;/P&gt;&lt;PRE&gt;proc sql
	create table count as
	select
	county,
	sum(val=1) as count_var
	from Rawdata
	group by month_code
quit;
run;&lt;/PRE&gt;</description>
    <pubDate>Wed, 11 Nov 2020 22:40:24 GMT</pubDate>
    <dc:creator>sasDave</dc:creator>
    <dc:date>2020-11-11T22:40:24Z</dc:date>
    <item>
      <title>Counting dataset entries by two different variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Counting-dataset-entries-by-two-different-variables/m-p/698239#M213520</link>
      <description>&lt;P&gt;SAS 9.4&lt;/P&gt;&lt;P&gt;I have a dataset of car crashes in Texas for each county and each month (each entry is a crash). I want to count each entry for each county/month combo to get the monthly crash total per county. So far I've tried PROC SQL and it mixed counties or months depending on how I set it up. There are 254 counties in Texas so using specific if functions is an unappealing option as well.&lt;/P&gt;&lt;P&gt;This is the PROC SQL function I tried&lt;/P&gt;&lt;PRE&gt;proc sql
	create table count as
	select
	county,
	sum(val=1) as count_var
	from Rawdata
	group by month_code
quit;
run;&lt;/PRE&gt;</description>
      <pubDate>Wed, 11 Nov 2020 22:40:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Counting-dataset-entries-by-two-different-variables/m-p/698239#M213520</guid>
      <dc:creator>sasDave</dc:creator>
      <dc:date>2020-11-11T22:40:24Z</dc:date>
    </item>
    <item>
      <title>Re: Counting dataset entries by two different variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Counting-dataset-entries-by-two-different-variables/m-p/698242#M213521</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc freq data=rawdata;
    tables county*month/list;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 11 Nov 2020 22:45:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Counting-dataset-entries-by-two-different-variables/m-p/698242#M213521</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2020-11-11T22:45:43Z</dc:date>
    </item>
  </channel>
</rss>

