<?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: Get distinct group wise summary in EXCEL Report using SAS in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Get-distinct-group-wise-summary-in-EXCEL-Report-using-SAS/m-p/729126#M226874</link>
    <description>&lt;P&gt;The closest you are going to get with Proc Tabulate I think is something like this:&lt;/P&gt;
&lt;PRE&gt;PROC TABULATE DATA=WORK.OUTDATA;
VAR Count_no;
CLASS Name / ORDER=UNFORMATTED MISSING;
CLASS CAT / ORDER=UNFORMATTED MISSING;
TABLE Name *(CAT all = 'Name Total') All='Overall Total',
   Count_no * Sum="Sum"*f=best5. ;
RUN;&lt;/PRE&gt;
&lt;P&gt;Which will do at total for the Name, which seems to be part of your goal. However Proc Tabulate will really want to display the individual Cat sum as well because that is in the dimension.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To create some odd mix of summary and categories like that you will need to go to something like the data step Report Writing Interface which will allow you to code which rows/columns span and to output specific values in specific merged cells at the cost of learning some additional programming steps.&lt;/P&gt;</description>
    <pubDate>Thu, 25 Mar 2021 16:31:48 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2021-03-25T16:31:48Z</dc:date>
    <item>
      <title>Get distinct group wise summary in EXCEL Report using SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Get-distinct-group-wise-summary-in-EXCEL-Report-using-SAS/m-p/729013#M226835</link>
      <description>&lt;P&gt;Hi Sir,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a data set name Have.&lt;/P&gt;&lt;P&gt;I want to create Excel report like mentioned in the attachment.&lt;/P&gt;&lt;P&gt;I have already tried Proc Report and Proc tabulate in SAS GUI option but not getting exact output as mentioned in the attachment , Please help me .&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Karthik&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 25 Mar 2021 11:54:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Get-distinct-group-wise-summary-in-EXCEL-Report-using-SAS/m-p/729013#M226835</guid>
      <dc:creator>karthik18</dc:creator>
      <dc:date>2021-03-25T11:54:38Z</dc:date>
    </item>
    <item>
      <title>Re: Get distinct group wise summary in EXCEL Report using SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Get-distinct-group-wise-summary-in-EXCEL-Report-using-SAS/m-p/729016#M226837</link>
      <description>&lt;P&gt;As I stated in &lt;A href="https://communities.sas.com/t5/SAS-Programming/Get-distinct-group-wise-summary-in-SAS-like-pivot-table/m-p/728837" target="_self"&gt;your other thread&lt;/A&gt;, many of us will not download Excel (or other) file attachments.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In order for us to help here, you would need to show us a portion of the actual data in data set HAVE (following &lt;A href="https://blogs.sas.com/content/sastraining/2016/03/11/jedi-sas-tricks-data-to-data-step-macro/" target="_self"&gt;these instructions&lt;/A&gt;, and not via any other method), and provide the desired output via screen capture by clicking on the "Insert Photos" icon.&lt;/P&gt;</description>
      <pubDate>Thu, 25 Mar 2021 11:57:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Get-distinct-group-wise-summary-in-EXCEL-Report-using-SAS/m-p/729016#M226837</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2021-03-25T11:57:25Z</dc:date>
    </item>
    <item>
      <title>Re: Get distinct group wise summary in EXCEL Report using SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Get-distinct-group-wise-summary-in-EXCEL-Report-using-SAS/m-p/729036#M226845</link>
      <description>&lt;P&gt;Hi Sir,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Attached Data.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot.png" style="width: 772px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/56475iB1F2C97B7285064F/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot.png" alt="Screenshot.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 25 Mar 2021 12:53:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Get-distinct-group-wise-summary-in-EXCEL-Report-using-SAS/m-p/729036#M226845</guid>
      <dc:creator>karthik18</dc:creator>
      <dc:date>2021-03-25T12:53:48Z</dc:date>
    </item>
    <item>
      <title>Re: Get distinct group wise summary in EXCEL Report using SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Get-distinct-group-wise-summary-in-EXCEL-Report-using-SAS/m-p/729043#M226851</link>
      <description>&lt;P&gt;You also need to provide (a portion of) your data, using the method &lt;A href="https://blogs.sas.com/content/sastraining/2016/03/11/jedi-sas-tricks-data-to-data-step-macro/" target="_self"&gt;here&lt;/A&gt; and not any other method.&lt;/P&gt;</description>
      <pubDate>Thu, 25 Mar 2021 13:36:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Get-distinct-group-wise-summary-in-EXCEL-Report-using-SAS/m-p/729043#M226851</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2021-03-25T13:36:45Z</dc:date>
    </item>
    <item>
      <title>Re: Get distinct group wise summary in EXCEL Report using SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Get-distinct-group-wise-summary-in-EXCEL-Report-using-SAS/m-p/729055#M226856</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Output.png" style="width: 288px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/56477iCD14FE9FEC185B77/image-size/large?v=v2&amp;amp;px=999" role="button" title="Output.png" alt="Output.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Hi sir i have attached detail data and expected excel report want snipit attached .&lt;/P&gt;</description>
      <pubDate>Thu, 25 Mar 2021 14:04:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Get-distinct-group-wise-summary-in-EXCEL-Report-using-SAS/m-p/729055#M226856</guid>
      <dc:creator>karthik18</dc:creator>
      <dc:date>2021-03-25T14:04:34Z</dc:date>
    </item>
    <item>
      <title>Re: Get distinct group wise summary in EXCEL Report using SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Get-distinct-group-wise-summary-in-EXCEL-Report-using-SAS/m-p/729058#M226857</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="HAVE.png" style="width: 325px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/56478i1348017EF5F6A225/image-size/large?v=v2&amp;amp;px=999" role="button" title="HAVE.png" alt="HAVE.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;attached input data in csv format&lt;/P&gt;</description>
      <pubDate>Thu, 25 Mar 2021 14:08:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Get-distinct-group-wise-summary-in-EXCEL-Report-using-SAS/m-p/729058#M226857</guid>
      <dc:creator>karthik18</dc:creator>
      <dc:date>2021-03-25T14:08:42Z</dc:date>
    </item>
    <item>
      <title>Re: Get distinct group wise summary in EXCEL Report using SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Get-distinct-group-wise-summary-in-EXCEL-Report-using-SAS/m-p/729063#M226860</link>
      <description>&lt;P&gt;So it seems you need to learn a valuable SAS skill first: how to create a dummy dataset for testing with DATALINES.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
input name :$10. cat :$3. count_no;
datalines;
SIVA SSC 1
;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Note that I did make &lt;EM&gt;guesses&lt;/EM&gt; about the lengths of your character variables, as that cannot be reliably deduced from Excel or CSV files.&lt;/P&gt;
&lt;P&gt;This is the way example data should be presented here on the Communities (or elsewhere where you go for help).&lt;/P&gt;</description>
      <pubDate>Thu, 25 Mar 2021 14:31:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Get-distinct-group-wise-summary-in-EXCEL-Report-using-SAS/m-p/729063#M226860</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2021-03-25T14:31:13Z</dc:date>
    </item>
    <item>
      <title>Re: Get distinct group wise summary in EXCEL Report using SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Get-distinct-group-wise-summary-in-EXCEL-Report-using-SAS/m-p/729113#M226871</link>
      <description>&lt;P&gt;Hi Sir,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sorry for the miscommunication, i am trying to learn SAS base. I have created the sample data using datalines,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data outdata;&lt;BR /&gt;infile datalines delimiter=',';&lt;BR /&gt;input Name $ CAT $ Count_no;&lt;BR /&gt;datalines;&lt;BR /&gt;SIVA,SSC,1&lt;BR /&gt;SIVA,HSC,1&lt;BR /&gt;SIVA,BSC,1&lt;BR /&gt;SIVA,MSC,1&lt;BR /&gt;RAJA,SSC,1&lt;BR /&gt;RAJA,HSC,1&lt;BR /&gt;RAJA,BSC,1&lt;BR /&gt;GIRI,SSC,1&lt;BR /&gt;GIRI,HSC,1&lt;BR /&gt;DOR,SSC,1&lt;BR /&gt;RAM,SSC,1&lt;BR /&gt;RAM,HSC,1&lt;BR /&gt;SUBA,SSC,1&lt;BR /&gt;SUBA,HSC,1&lt;BR /&gt;SUBA,BSC,1&lt;BR /&gt;SUBA,MSC,1&lt;BR /&gt;MOJ,SSC,1&lt;BR /&gt;MOJ,HSC,1&lt;BR /&gt;MOJ,BSC,1&lt;BR /&gt;;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also, I am trying to create the summary report but summary column its not summed up into single value.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;PROC TABULATE DATA=WORK.OUTDATA;&lt;BR /&gt;VAR Count_no;&lt;BR /&gt;CLASS Name / ORDER=UNFORMATTED MISSING;&lt;BR /&gt;CLASS CAT / ORDER=UNFORMATTED MISSING;&lt;BR /&gt;TABLE Name *CAT all = 'Total',(Count_no * Sum={LABEL="Sum"} );&lt;BR /&gt;RUN;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 25 Mar 2021 15:57:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Get-distinct-group-wise-summary-in-EXCEL-Report-using-SAS/m-p/729113#M226871</guid>
      <dc:creator>karthik18</dc:creator>
      <dc:date>2021-03-25T15:57:08Z</dc:date>
    </item>
    <item>
      <title>Re: Get distinct group wise summary in EXCEL Report using SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Get-distinct-group-wise-summary-in-EXCEL-Report-using-SAS/m-p/729126#M226874</link>
      <description>&lt;P&gt;The closest you are going to get with Proc Tabulate I think is something like this:&lt;/P&gt;
&lt;PRE&gt;PROC TABULATE DATA=WORK.OUTDATA;
VAR Count_no;
CLASS Name / ORDER=UNFORMATTED MISSING;
CLASS CAT / ORDER=UNFORMATTED MISSING;
TABLE Name *(CAT all = 'Name Total') All='Overall Total',
   Count_no * Sum="Sum"*f=best5. ;
RUN;&lt;/PRE&gt;
&lt;P&gt;Which will do at total for the Name, which seems to be part of your goal. However Proc Tabulate will really want to display the individual Cat sum as well because that is in the dimension.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To create some odd mix of summary and categories like that you will need to go to something like the data step Report Writing Interface which will allow you to code which rows/columns span and to output specific values in specific merged cells at the cost of learning some additional programming steps.&lt;/P&gt;</description>
      <pubDate>Thu, 25 Mar 2021 16:31:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Get-distinct-group-wise-summary-in-EXCEL-Report-using-SAS/m-p/729126#M226874</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2021-03-25T16:31:48Z</dc:date>
    </item>
    <item>
      <title>Re: Get distinct group wise summary in EXCEL Report using SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Get-distinct-group-wise-summary-in-EXCEL-Report-using-SAS/m-p/729356#M226943</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt; 

data outdata;
infile datalines delimiter=',';
input Name $ CAT $ Count_no;
datalines;
SIVA,SSC,1
SIVA,HSC,1
SIVA,BSC,1
SIVA,MSC,1
RAJA,SSC,1
RAJA,HSC,1
RAJA,BSC,1
GIRI,SSC,1
GIRI,HSC,1
DOR,SSC,1
RAM,SSC,1
RAM,HSC,1
SUBA,SSC,1
SUBA,HSC,1
SUBA,BSC,1
SUBA,MSC,1
MOJ,SSC,1
MOJ,HSC,1
MOJ,BSC,1
;
run;

proc sql;
create table want as
select name,cat,sum(count_no) as sum
 from outdata
  group by name;
quit;

proc report data=want nowd spanrows;
column name cat sum;
define name/group style={vjust=m};
define cat/display;
define sum/group 'Count No' style={vjust=m};
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="x.jpg" style="width: 232px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/56553iCCEFA7F431511E23/image-size/large?v=v2&amp;amp;px=999" role="button" title="x.jpg" alt="x.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 26 Mar 2021 11:55:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Get-distinct-group-wise-summary-in-EXCEL-Report-using-SAS/m-p/729356#M226943</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2021-03-26T11:55:23Z</dc:date>
    </item>
    <item>
      <title>Re: Get distinct group wise summary in EXCEL Report using SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Get-distinct-group-wise-summary-in-EXCEL-Report-using-SAS/m-p/730059#M227288</link>
      <description>&lt;P&gt;Thanks you sir. This code is perfect.&lt;/P&gt;</description>
      <pubDate>Tue, 30 Mar 2021 11:40:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Get-distinct-group-wise-summary-in-EXCEL-Report-using-SAS/m-p/730059#M227288</guid>
      <dc:creator>karthik18</dc:creator>
      <dc:date>2021-03-30T11:40:20Z</dc:date>
    </item>
  </channel>
</rss>

