<?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: tabulate columns between class levels in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/tabulate-columns-between-class-levels/m-p/31191#M4674</link>
    <description>Here is a little code with the SASHELP.CLASS dataset. Does it look like what you want to do ? If so, just use the same idea, replacing the "1" values in the new variables by SLAB_TON.&lt;BR /&gt;
[pre]&lt;BR /&gt;
DATA work.class ;&lt;BR /&gt;
  SET sashelp.class ;&lt;BR /&gt;
  IF sex="F" THEN sexF = 1 ;&lt;BR /&gt;
  ELSE	          sexM = 1 ;&lt;BR /&gt;
RUN ;&lt;BR /&gt;
PROC FORMAT ;&lt;BR /&gt;
  VALUE ages &lt;BR /&gt;
     LOW - 14 = "14 -" &lt;BR /&gt;
     OTHER    = "15 +" ;&lt;BR /&gt;
  VALUE weights&lt;BR /&gt;
     LOW - 100 = "&amp;lt;100 lb"&lt;BR /&gt;
     OTHER     = "&amp;gt;100 lb" ;&lt;BR /&gt;
RUN ;&lt;BR /&gt;
PROC TABULATE DATA = work.class F= 7. ;&lt;BR /&gt;
  CLASS age weight ;&lt;BR /&gt;
  VAR sexF sexM ;&lt;BR /&gt;
  FORMAT age ages. weight weights. ;&lt;BR /&gt;
  TABLE weight,&lt;BR /&gt;
       (sexM="# boys"*age=""*SUM="" sexF="# girls"*SUM="") ;&lt;BR /&gt;
RUN ;</description>
    <pubDate>Wed, 16 Jul 2008 15:20:12 GMT</pubDate>
    <dc:creator>Olivier</dc:creator>
    <dc:date>2008-07-16T15:20:12Z</dc:date>
    <item>
      <title>tabulate columns between class levels</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/tabulate-columns-between-class-levels/m-p/31190#M4673</link>
      <description>I'm using the table statement as shown below.  InvenDate has 2 levels and both levels have data under Prod_Grp_Dim_Cd and Slab_Loc_Dim_Cd.  I'd like to change the table so that Slab_Loc_Dim_Cd is reported for level 2 but not for level 1 of InvenDate.  I tried adding two columns to the data (InvenDate1 &amp;amp; InvenDate2) and building a table statement (the second one below) that would concatenate across the page but it gets messed up with missing values in InvenDate1 and InvenDate2.&lt;BR /&gt;
&lt;BR /&gt;
Looking for suggestions ...   Thanks&lt;BR /&gt;
&lt;BR /&gt;
table SLAB_SOURCE_DIM_CD=' '*&lt;BR /&gt;
        (SLAB_GRD_FAM_NAME=' ' all) all,&lt;BR /&gt;
       InvenDate='Inventory Status as of'*&lt;BR /&gt;
        (PROD_GRP_DIM_CD='Category' all SLAB_LOC_DIM_CD='Location')&lt;BR /&gt;
        *SLAB_TON=' '*sum=' '*;&lt;BR /&gt;
&lt;BR /&gt;
        &lt;BR /&gt;
&lt;BR /&gt;
table SLAB_SOURCE_DIM_CD=' '*                                                                                                         &lt;BR /&gt;
        (SLAB_GRD_FAM_NAME=' ' all) all,                                                                                                &lt;BR /&gt;
                        InvenDate1='Inventory Status as of'*                                                                            &lt;BR /&gt;
        (PROD_GRP_DIM_CD='Category' all)                                                                                                &lt;BR /&gt;
        *SLAB_TON=' '*sum=' '                                                                                                           &lt;BR /&gt;
                                                                                                                                        &lt;BR /&gt;
        InvenDate2='Inventory Status as of'*                                                                                            &lt;BR /&gt;
        (PROD_GRP_DIM_CD='Category' all SLAB_LOC_DIM_CD='Location')                                                                     &lt;BR /&gt;
        *SLAB_TON=' '*sum=' '*  ;</description>
      <pubDate>Tue, 15 Jul 2008 15:58:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/tabulate-columns-between-class-levels/m-p/31190#M4673</guid>
      <dc:creator>Bill</dc:creator>
      <dc:date>2008-07-15T15:58:09Z</dc:date>
    </item>
    <item>
      <title>Re: tabulate columns between class levels</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/tabulate-columns-between-class-levels/m-p/31191#M4674</link>
      <description>Here is a little code with the SASHELP.CLASS dataset. Does it look like what you want to do ? If so, just use the same idea, replacing the "1" values in the new variables by SLAB_TON.&lt;BR /&gt;
[pre]&lt;BR /&gt;
DATA work.class ;&lt;BR /&gt;
  SET sashelp.class ;&lt;BR /&gt;
  IF sex="F" THEN sexF = 1 ;&lt;BR /&gt;
  ELSE	          sexM = 1 ;&lt;BR /&gt;
RUN ;&lt;BR /&gt;
PROC FORMAT ;&lt;BR /&gt;
  VALUE ages &lt;BR /&gt;
     LOW - 14 = "14 -" &lt;BR /&gt;
     OTHER    = "15 +" ;&lt;BR /&gt;
  VALUE weights&lt;BR /&gt;
     LOW - 100 = "&amp;lt;100 lb"&lt;BR /&gt;
     OTHER     = "&amp;gt;100 lb" ;&lt;BR /&gt;
RUN ;&lt;BR /&gt;
PROC TABULATE DATA = work.class F= 7. ;&lt;BR /&gt;
  CLASS age weight ;&lt;BR /&gt;
  VAR sexF sexM ;&lt;BR /&gt;
  FORMAT age ages. weight weights. ;&lt;BR /&gt;
  TABLE weight,&lt;BR /&gt;
       (sexM="# boys"*age=""*SUM="" sexF="# girls"*SUM="") ;&lt;BR /&gt;
RUN ;</description>
      <pubDate>Wed, 16 Jul 2008 15:20:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/tabulate-columns-between-class-levels/m-p/31191#M4674</guid>
      <dc:creator>Olivier</dc:creator>
      <dc:date>2008-07-16T15:20:12Z</dc:date>
    </item>
    <item>
      <title>Re: tabulate columns between class levels</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/tabulate-columns-between-class-levels/m-p/31192#M4675</link>
      <description>Olivier;&lt;BR /&gt;
&lt;BR /&gt;
Here's what I was looking for - and you helped me to get there.  Thank you!&lt;BR /&gt;
&lt;BR /&gt;
DATA work.class ;&lt;BR /&gt;
	SET sashelp.class ;&lt;BR /&gt;
	IF sex="F" THEN do;sexF = 1 ;sex2=1;end;&lt;BR /&gt;
	ELSE do;sex2=2;end;;&lt;BR /&gt;
RUN ;&lt;BR /&gt;
PROC FORMAT ;&lt;BR /&gt;
	VALUE ages&lt;BR /&gt;
		LOW - 14 = "14 -"&lt;BR /&gt;
		OTHER    = "15 +"&lt;BR /&gt;
	;&lt;BR /&gt;
	VALUE weights&lt;BR /&gt;
		LOW - 100 = "&amp;lt;100 lb"&lt;BR /&gt;
		OTHER     = "&amp;gt;100 lb"&lt;BR /&gt;
	;&lt;BR /&gt;
RUN ;&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
PROC TABULATE DATA = work.class F= 7. ;&lt;BR /&gt;
	CLASS age weight sex;&lt;BR /&gt;
	VAR sexF sex2 ;&lt;BR /&gt;
	FORMAT age ages. weight weights. ;&lt;BR /&gt;
	TABLE weight,&lt;BR /&gt;
	      sex*sex2*sum sexF ; &lt;BR /&gt;
RUN ;</description>
      <pubDate>Wed, 16 Jul 2008 16:43:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/tabulate-columns-between-class-levels/m-p/31192#M4675</guid>
      <dc:creator>Bill</dc:creator>
      <dc:date>2008-07-16T16:43:29Z</dc:date>
    </item>
  </channel>
</rss>

