<?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: Transposing Multiple Observation to single variable in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Transposing-Multiple-Observation-to-single-variable/m-p/675439#M203527</link>
    <description>&lt;P&gt;This has worked like a dream - thank you!&lt;/P&gt;</description>
    <pubDate>Sat, 08 Aug 2020 21:30:55 GMT</pubDate>
    <dc:creator>Loobylou</dc:creator>
    <dc:date>2020-08-08T21:30:55Z</dc:date>
    <item>
      <title>Transposing Multiple Observation to single variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Transposing-Multiple-Observation-to-single-variable/m-p/675437#M203525</link>
      <description>&lt;P&gt;I'm a relatively new SAS user, and looking for help to re-organise/summarise my data.&lt;/P&gt;&lt;P&gt;I have data on the gender of each Director in a series of firms, in the format:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;FIRM ID&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; GENDER&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;M&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;M&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;F&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;M&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;F&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT size="3"&gt;I want to be able to summarize and transpose this data, so I have only one observation per firm, and a count of how many male and female directors.&amp;nbsp; So the resulting format would look like:&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;FIRM ID&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;MALE&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;FEMALE&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="3"&gt;I'm wondering if I can use PROC TRANSPOSE for this, but can't figure out how to do this together with a count of male/female.&amp;nbsp; &amp;nbsp;Grateful for any guidance/suggestions!&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 08 Aug 2020 21:08:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Transposing-Multiple-Observation-to-single-variable/m-p/675437#M203525</guid>
      <dc:creator>Loobylou</dc:creator>
      <dc:date>2020-08-08T21:08:04Z</dc:date>
    </item>
    <item>
      <title>Re: Transposing Multiple Observation to single variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Transposing-Multiple-Observation-to-single-variable/m-p/675438#M203526</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
data have;
input FIRM_ID          GENDER $;
cards;
1                           M

1                           M

1                           F

2                           M

2                           F
;

proc sql;
create table want as
select FIRM_ID,sum(gender='M') as Male,sum(gender='F') as Female
from have
group by firm_id;
quit;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 08 Aug 2020 21:12:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Transposing-Multiple-Observation-to-single-variable/m-p/675438#M203526</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2020-08-08T21:12:20Z</dc:date>
    </item>
    <item>
      <title>Re: Transposing Multiple Observation to single variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Transposing-Multiple-Observation-to-single-variable/m-p/675439#M203527</link>
      <description>&lt;P&gt;This has worked like a dream - thank you!&lt;/P&gt;</description>
      <pubDate>Sat, 08 Aug 2020 21:30:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Transposing-Multiple-Observation-to-single-variable/m-p/675439#M203527</guid>
      <dc:creator>Loobylou</dc:creator>
      <dc:date>2020-08-08T21:30:55Z</dc:date>
    </item>
  </channel>
</rss>

