<?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 How many times two teams face head to head: need count in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/How-many-times-two-teams-face-head-to-head-need-count/m-p/632872#M21137</link>
    <description>&lt;P&gt;Sample data&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;DATA HEAD_COUNT;&lt;BR /&gt;INFILE CARDS;&lt;BR /&gt;INPUT TEAM1$ TEAM2$;&lt;BR /&gt;CARDS;&lt;BR /&gt;IND AUS&lt;BR /&gt;AUS IND&lt;BR /&gt;NZ IND&lt;BR /&gt;IND NZ&lt;BR /&gt;PAK IND&lt;BR /&gt;WI PAK&lt;BR /&gt;PAK AUS&lt;BR /&gt;;&lt;BR /&gt;RUN;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Required output :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Team&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Head_count&lt;BR /&gt;IND - AUS&amp;nbsp; &amp;nbsp; 2&lt;BR /&gt;NZ - IND&amp;nbsp; &amp;nbsp; &amp;nbsp; 2&lt;BR /&gt;PAK - IND&amp;nbsp; &amp;nbsp; 1&lt;BR /&gt;WI - PAK&amp;nbsp; &amp;nbsp; &amp;nbsp; 1&lt;BR /&gt;PAK - AUS&amp;nbsp; &amp;nbsp;1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I treid with proc freq cross column approach&amp;nbsp; but not able to acheive final results&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 18 Mar 2020 07:04:03 GMT</pubDate>
    <dc:creator>Veeresh</dc:creator>
    <dc:date>2020-03-18T07:04:03Z</dc:date>
    <item>
      <title>How many times two teams face head to head: need count</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-many-times-two-teams-face-head-to-head-need-count/m-p/632872#M21137</link>
      <description>&lt;P&gt;Sample data&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;DATA HEAD_COUNT;&lt;BR /&gt;INFILE CARDS;&lt;BR /&gt;INPUT TEAM1$ TEAM2$;&lt;BR /&gt;CARDS;&lt;BR /&gt;IND AUS&lt;BR /&gt;AUS IND&lt;BR /&gt;NZ IND&lt;BR /&gt;IND NZ&lt;BR /&gt;PAK IND&lt;BR /&gt;WI PAK&lt;BR /&gt;PAK AUS&lt;BR /&gt;;&lt;BR /&gt;RUN;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Required output :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Team&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Head_count&lt;BR /&gt;IND - AUS&amp;nbsp; &amp;nbsp; 2&lt;BR /&gt;NZ - IND&amp;nbsp; &amp;nbsp; &amp;nbsp; 2&lt;BR /&gt;PAK - IND&amp;nbsp; &amp;nbsp; 1&lt;BR /&gt;WI - PAK&amp;nbsp; &amp;nbsp; &amp;nbsp; 1&lt;BR /&gt;PAK - AUS&amp;nbsp; &amp;nbsp;1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I treid with proc freq cross column approach&amp;nbsp; but not able to acheive final results&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 18 Mar 2020 07:04:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-many-times-two-teams-face-head-to-head-need-count/m-p/632872#M21137</guid>
      <dc:creator>Veeresh</dc:creator>
      <dc:date>2020-03-18T07:04:03Z</dc:date>
    </item>
    <item>
      <title>Re: How many times two teams face head to head: need count</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-many-times-two-teams-face-head-to-head-need-count/m-p/632874#M21138</link>
      <description>&lt;P&gt;Use call sort() to sort the teams per observation, and then proc summary to get the count:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data head_count;
input team1 $ team2 $;
datalines;
IND AUS
AUS IND
NZ IND
IND NZ
PAK IND
WI PAK
PAK AUS
;

data sorted;
set head_count;
call sort(of team:);
run;

proc summary data=sorted nway;
class team1 team2;
output out=want (drop=_type_ rename=(_freq_=count));
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 18 Mar 2020 07:24:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-many-times-two-teams-face-head-to-head-need-count/m-p/632874#M21138</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-03-18T07:24:23Z</dc:date>
    </item>
  </channel>
</rss>

