<?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: Colum values within a column in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Colum-values-within-a-column/m-p/48230#M13032</link>
    <description>Hello Siddhatha,&lt;BR /&gt;
&lt;BR /&gt;
I agree with Cynthia that this task is for procs REPORT or TABULATE. Anyway the major part of the possible solution could be like this:&lt;BR /&gt;
[pre]&lt;BR /&gt;
proc means data=outst_amt noprint;&lt;BR /&gt;
  output out=t1 (drop=_freq_) Sum=S; &lt;BR /&gt;
  var out_amount;&lt;BR /&gt;
  class cus_cat prd_cat date_values;&lt;BR /&gt;
run;&lt;BR /&gt;
proc transpose data=t1 (where=(_type_=5)) out=r1 (drop=_name_) prefix=_;&lt;BR /&gt;
  ID date_values;&lt;BR /&gt;
  var S;&lt;BR /&gt;
  by cus_cat;&lt;BR /&gt;
run;&lt;BR /&gt;
proc transpose data=t1 (where=(_type_=3)) out=r2 (drop=_name_) prefix=_;&lt;BR /&gt;
  ID date_values;&lt;BR /&gt;
  var S;&lt;BR /&gt;
  by prd_cat;&lt;BR /&gt;
run;&lt;BR /&gt;
[/pre]&lt;BR /&gt;
Sincerely,&lt;BR /&gt;
SPR</description>
    <pubDate>Fri, 10 Dec 2010 18:54:13 GMT</pubDate>
    <dc:creator>SPR</dc:creator>
    <dc:date>2010-12-10T18:54:13Z</dc:date>
    <item>
      <title>Colum values within a column</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Colum-values-within-a-column/m-p/48228#M13030</link>
      <description>data outst_amt;&lt;BR /&gt;
input prd_cat : $25. cus_cat &amp;amp; $20. Date_values &amp;amp; $20. Out_amount ;&lt;BR /&gt;
datalines;&lt;BR /&gt;
Hire-Purchase Business-banking 25thaug2010 234&lt;BR /&gt;
Housing-Loans Consumer-banking 26-Aug-2010 243&lt;BR /&gt;
Credit-card Business-banking 26-Aug-2010 342&lt;BR /&gt;
Personal-Loan Consumer-banking 25-Aug-2010 456&lt;BR /&gt;
Co-op-Personal-Loan Business-banking 27-Aug-2010 356&lt;BR /&gt;
Share-Margin-Financing Consumer-banking 28-Aug-2010 123&lt;BR /&gt;
Revolving-Credits Business-banking 25-Aug-2010 213 &lt;BR /&gt;
Syndicated-Loans Consumer-banking 24-Aug-2010 432&lt;BR /&gt;
Trade-Financing Business-banking 29-Aug-2010 124&lt;BR /&gt;
Term-Loans Consumer-banking 31-Aug-2010 145 &lt;BR /&gt;
Overdraft Business-banking 25-Aug-2010 234&lt;BR /&gt;
Other-loans Consumer-banking 26-Aug-2010 187&lt;BR /&gt;
;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
I want the output as follows:&lt;BR /&gt;
&lt;BR /&gt;
Item Descriptions                                        - -----Date values------- &lt;BR /&gt;
                                                         25-Aug 26-Aug 27-aug 28-Aug &lt;BR /&gt;
A.Loans by Business Segment&lt;BR /&gt;
Business banking                                314 345&lt;BR /&gt;
Consumer banking                               234 213&lt;BR /&gt;
Total Gross Loans&lt;BR /&gt;
&lt;BR /&gt;
B.Gross Loans by Products&lt;BR /&gt;
Hire Purchase                                    367 276&lt;BR /&gt;
Housing Loans                                                   342&lt;BR /&gt;
Credit card&lt;BR /&gt;
Personal Loan                                         243&lt;BR /&gt;
Co-op Personal Loan&lt;BR /&gt;
Share Margin Financing                          234 567 &lt;BR /&gt;
Revolving Credits                                  546&lt;BR /&gt;
Syndicated Loans&lt;BR /&gt;
Trade Financing&lt;BR /&gt;
Term Loans&lt;BR /&gt;
Overdraft                                    345 657 546&lt;BR /&gt;
Other loans&lt;BR /&gt;
Total Gross Loans&lt;BR /&gt;
&lt;BR /&gt;
Can anyone help me on this, as I was strucked from morning onwards.&lt;BR /&gt;
Thanks in advance</description>
      <pubDate>Fri, 10 Dec 2010 15:31:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Colum-values-within-a-column/m-p/48228#M13030</guid>
      <dc:creator>Siddhartha</dc:creator>
      <dc:date>2010-12-10T15:31:15Z</dc:date>
    </item>
    <item>
      <title>Re: Colum values within a column</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Colum-values-within-a-column/m-p/48229#M13031</link>
      <description>Hi:&lt;BR /&gt;
  This report could be done with PROC REPORT or PROC TABULATE. There is no need to post your question in more than one forum -- it makes it look like you are shopping for an answer and don't really read the descriptions of the forum topics.&lt;BR /&gt;
&lt;BR /&gt;
  You have posted this question in the ODS and Reporting forum, which is probably a more appropriate place. There has already been a PROC TABULATE example posted there.&lt;BR /&gt;
 &lt;A href="http://support.sas.com/forums/thread.jspa?threadID=12213&amp;amp;tstart=0" target="_blank"&gt;http://support.sas.com/forums/thread.jspa?threadID=12213&amp;amp;tstart=0&lt;/A&gt;&lt;BR /&gt;
 &lt;BR /&gt;
  If you have an urgent or critical need, then you should open a track with Tech Support. To open a track with Tech Support, fill out the form at this link:&lt;BR /&gt;
&lt;A href="http://support.sas.com/ctx/supportform/createForm" target="_blank"&gt;http://support.sas.com/ctx/supportform/createForm&lt;/A&gt;&lt;BR /&gt;
 &lt;BR /&gt;
It might also be useful if you would take a step back and  search for previous forum postings about PROC REPORT and PROC TABULATE to see the types of reports and types of capabilities that each procedure has. In addition, a Google Search on either of these strings:&lt;BR /&gt;
SAS PROC REPORT beginner&lt;BR /&gt;
SAS PROC TABULATE beginner &lt;BR /&gt;
 &lt;BR /&gt;
and you will find some useful hits that outline both REPORT and TABULATE basics.&lt;BR /&gt;
 &lt;BR /&gt;
cynthia</description>
      <pubDate>Fri, 10 Dec 2010 16:50:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Colum-values-within-a-column/m-p/48229#M13031</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2010-12-10T16:50:16Z</dc:date>
    </item>
    <item>
      <title>Re: Colum values within a column</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Colum-values-within-a-column/m-p/48230#M13032</link>
      <description>Hello Siddhatha,&lt;BR /&gt;
&lt;BR /&gt;
I agree with Cynthia that this task is for procs REPORT or TABULATE. Anyway the major part of the possible solution could be like this:&lt;BR /&gt;
[pre]&lt;BR /&gt;
proc means data=outst_amt noprint;&lt;BR /&gt;
  output out=t1 (drop=_freq_) Sum=S; &lt;BR /&gt;
  var out_amount;&lt;BR /&gt;
  class cus_cat prd_cat date_values;&lt;BR /&gt;
run;&lt;BR /&gt;
proc transpose data=t1 (where=(_type_=5)) out=r1 (drop=_name_) prefix=_;&lt;BR /&gt;
  ID date_values;&lt;BR /&gt;
  var S;&lt;BR /&gt;
  by cus_cat;&lt;BR /&gt;
run;&lt;BR /&gt;
proc transpose data=t1 (where=(_type_=3)) out=r2 (drop=_name_) prefix=_;&lt;BR /&gt;
  ID date_values;&lt;BR /&gt;
  var S;&lt;BR /&gt;
  by prd_cat;&lt;BR /&gt;
run;&lt;BR /&gt;
[/pre]&lt;BR /&gt;
Sincerely,&lt;BR /&gt;
SPR</description>
      <pubDate>Fri, 10 Dec 2010 18:54:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Colum-values-within-a-column/m-p/48230#M13032</guid>
      <dc:creator>SPR</dc:creator>
      <dc:date>2010-12-10T18:54:13Z</dc:date>
    </item>
    <item>
      <title>Re: Colum values within a column</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Colum-values-within-a-column/m-p/48231#M13033</link>
      <description>Hi:&lt;BR /&gt;
  No TRANSPOSE is necessary, although it is a clever solution. Both PROC REPORT and PROC TABULATE will create reports directly from the data without any restructuring.&lt;BR /&gt;
 &lt;BR /&gt;
  But before I post any code here, I'd like to hear from the original poster about what code they've tried and whether they've looked at or tried any of the code that's been posted in response to this and similar questions.&lt;BR /&gt;
 &lt;BR /&gt;
cynthia</description>
      <pubDate>Fri, 10 Dec 2010 22:09:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Colum-values-within-a-column/m-p/48231#M13033</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2010-12-10T22:09:25Z</dc:date>
    </item>
  </channel>
</rss>

