<?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 make a cross table with proc report and divide the sum of two variables? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/how-make-a-cross-table-with-proc-report-and-divide-the-sum-of/m-p/835749#M330426</link>
    <description>&lt;P&gt;hey&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13549"&gt;@Cynthia_sas&lt;/a&gt;&amp;nbsp; can you give a hand here please?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i have 4 variables (2 numeric and 2 categorical), two for column and row group like the exemple bellow (fx_cr and gh_simp). You can ignore the "x2" rows/columns.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and other two variable to make the sum(var 1)/sum(var 2) inside of each spot of the exemple above. Do you have a code for this? i tried but i couldnt do that.&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="LAIO_0-1664416397994.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/75698i911D0CFD0924F51E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="LAIO_0-1664416397994.png" alt="LAIO_0-1664416397994.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 29 Sep 2022 01:56:32 GMT</pubDate>
    <dc:creator>LAIO</dc:creator>
    <dc:date>2022-09-29T01:56:32Z</dc:date>
    <item>
      <title>how make a cross table with proc report and divide the sum of two variables?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-make-a-cross-table-with-proc-report-and-divide-the-sum-of/m-p/835749#M330426</link>
      <description>&lt;P&gt;hey&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13549"&gt;@Cynthia_sas&lt;/a&gt;&amp;nbsp; can you give a hand here please?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i have 4 variables (2 numeric and 2 categorical), two for column and row group like the exemple bellow (fx_cr and gh_simp). You can ignore the "x2" rows/columns.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and other two variable to make the sum(var 1)/sum(var 2) inside of each spot of the exemple above. Do you have a code for this? i tried but i couldnt do that.&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="LAIO_0-1664416397994.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/75698i911D0CFD0924F51E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="LAIO_0-1664416397994.png" alt="LAIO_0-1664416397994.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 29 Sep 2022 01:56:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-make-a-cross-table-with-proc-report-and-divide-the-sum-of/m-p/835749#M330426</guid>
      <dc:creator>LAIO</dc:creator>
      <dc:date>2022-09-29T01:56:32Z</dc:date>
    </item>
    <item>
      <title>Re: how make a cross table with proc report and divide the sum of two variables?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-make-a-cross-table-with-proc-report-and-divide-the-sum-of/m-p/835869#M330486</link>
      <description>&lt;P&gt;Hi:&lt;BR /&gt;Without code and data, it's hard to provide any constructive suggestions. Your current output looks like PROC TABULATE output. What PROC REPORT code have you tried? It's not clear to me from your screen shot, which 2 variables need to be divided and whether the division results go in the row (at the bottom of the report) or in a column (to the right side of the report). Can you provide any sample data in the form of a DATA step program? To accomplish crosstabs with PROC REPORT, you have to define ACROSS variable(s). Here's a simple example using SASHELP.CLASS. Getting the sum of the HEIGHT variable is a bit silly, but is shows how to ask for the SUM statistic with a numeric variable under the ACROSS item and also shows the use of the absolute column number in the division:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Cynthia_sas_0-1664464827802.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/75709iD559298313D571BE/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Cynthia_sas_0-1664464827802.png" alt="Cynthia_sas_0-1664464827802.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Without data, it's hard to do more than provide you with this simple example.&lt;BR /&gt;Cynthia&lt;/P&gt;</description>
      <pubDate>Thu, 29 Sep 2022 15:22:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-make-a-cross-table-with-proc-report-and-divide-the-sum-of/m-p/835869#M330486</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2022-09-29T15:22:18Z</dc:date>
    </item>
  </channel>
</rss>

