<?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 PROC TABULATE: Labeling my column in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/PROC-TABULATE-Labeling-my-column/m-p/431459#M281710</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is my first post on these forums (I'm pretty sure), so I apologize if I've mis-categorized the post or if the question has already been answered (I couldn't find it if it has).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm learning PROC TABULATE, and I've gotten pretty far with it for day 1 (I think), but one thing I cannot get right is labeling my columns in the output as I wish.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here's my current code, which does run and produces the numbers I expect to see:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc format;&lt;BR /&gt;picture pct (round) low-high='009.99%';&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc tabulate data=GRPR_PLC_CLM;&lt;BR /&gt;class RESERVING_LINE COVERAGE EFFECTIVEYEAR;&lt;BR /&gt;var Incurred_Loss__Ledger_ CC CHARGEDPREM_WITHCOMM;&lt;BR /&gt;table RESERVING_LINE*COVERAGE all&lt;BR /&gt;,(EFFECTIVEYEAR all)*((CC*f=comma12.)&lt;BR /&gt;(ChargedPrem_withComm*f=dollar12.)&lt;BR /&gt;(Incurred_Loss__Ledger_*f=dollar12.)&lt;BR /&gt;(Incurred_Loss__Ledger_*pctsum&amp;lt;ChargedPrem_withComm&amp;gt;*f=pct.));&lt;BR /&gt;title 'Coverages by Effective Year';&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The output looks like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="sastab.JPG" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/18146i927891FE4BEE3C03/image-size/large?v=v2&amp;amp;px=999" role="button" title="sastab.JPG" alt="sastab.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The problem that I'm having is that I want the column which is currently labeled "Incurred Loss (Ledger)" with "PctSum" underneath it to read "Loss Ratio" where "Incurred Loss (Ledger)" is... and I don't much care if it still says PctSum under it or not.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've tried a number of things so far and nothing seems to work. Does anybody have any suggestions for me?&lt;/P&gt;</description>
    <pubDate>Fri, 26 Jan 2018 21:30:40 GMT</pubDate>
    <dc:creator>sikologik</dc:creator>
    <dc:date>2018-01-26T21:30:40Z</dc:date>
    <item>
      <title>PROC TABULATE: Labeling my column</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-TABULATE-Labeling-my-column/m-p/431459#M281710</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is my first post on these forums (I'm pretty sure), so I apologize if I've mis-categorized the post or if the question has already been answered (I couldn't find it if it has).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm learning PROC TABULATE, and I've gotten pretty far with it for day 1 (I think), but one thing I cannot get right is labeling my columns in the output as I wish.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here's my current code, which does run and produces the numbers I expect to see:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc format;&lt;BR /&gt;picture pct (round) low-high='009.99%';&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc tabulate data=GRPR_PLC_CLM;&lt;BR /&gt;class RESERVING_LINE COVERAGE EFFECTIVEYEAR;&lt;BR /&gt;var Incurred_Loss__Ledger_ CC CHARGEDPREM_WITHCOMM;&lt;BR /&gt;table RESERVING_LINE*COVERAGE all&lt;BR /&gt;,(EFFECTIVEYEAR all)*((CC*f=comma12.)&lt;BR /&gt;(ChargedPrem_withComm*f=dollar12.)&lt;BR /&gt;(Incurred_Loss__Ledger_*f=dollar12.)&lt;BR /&gt;(Incurred_Loss__Ledger_*pctsum&amp;lt;ChargedPrem_withComm&amp;gt;*f=pct.));&lt;BR /&gt;title 'Coverages by Effective Year';&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The output looks like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="sastab.JPG" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/18146i927891FE4BEE3C03/image-size/large?v=v2&amp;amp;px=999" role="button" title="sastab.JPG" alt="sastab.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The problem that I'm having is that I want the column which is currently labeled "Incurred Loss (Ledger)" with "PctSum" underneath it to read "Loss Ratio" where "Incurred Loss (Ledger)" is... and I don't much care if it still says PctSum under it or not.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've tried a number of things so far and nothing seems to work. Does anybody have any suggestions for me?&lt;/P&gt;</description>
      <pubDate>Fri, 26 Jan 2018 21:30:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-TABULATE-Labeling-my-column/m-p/431459#M281710</guid>
      <dc:creator>sikologik</dc:creator>
      <dc:date>2018-01-26T21:30:40Z</dc:date>
    </item>
    <item>
      <title>Re: PROC TABULATE: Labeling my column</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-TABULATE-Labeling-my-column/m-p/431467#M281711</link>
      <description>&lt;P&gt;Always check the docs &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://documentation.sas.com/?docsetId=proc&amp;amp;docsetVersion=9.4&amp;amp;docsetTarget=p0nug0r42bnz2cn1k9n16siq2t69.htm&amp;amp;locale=en" target="_blank"&gt;http://documentation.sas.com/?docsetId=proc&amp;amp;docsetVersion=9.4&amp;amp;docsetTarget=p0nug0r42bnz2cn1k9n16siq2t69.htm&amp;amp;locale=en&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;(Incurred_Loss__Ledger_='Loss Ratio' *pctsum&amp;lt;ChargedPrem_withComm&amp;gt;*f=pct.));&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Untested, obviously, but something along those lines is what you need.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 26 Jan 2018 22:09:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-TABULATE-Labeling-my-column/m-p/431467#M281711</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-01-26T22:09:35Z</dc:date>
    </item>
    <item>
      <title>Re: PROC TABULATE: Labeling my column</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-TABULATE-Labeling-my-column/m-p/431470#M281712</link>
      <description>Thanks Reeza. As it turns out, I was using that particular documentation along with a few other things I got out of google to get *almost* all the way home. 99% of the way there. Your code snippet got me the final 1% and now I have everything I need- thanks!</description>
      <pubDate>Fri, 26 Jan 2018 22:15:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-TABULATE-Labeling-my-column/m-p/431470#M281712</guid>
      <dc:creator>sikologik</dc:creator>
      <dc:date>2018-01-26T22:15:30Z</dc:date>
    </item>
    <item>
      <title>Re: PROC TABULATE: Labeling my column</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-TABULATE-Labeling-my-column/m-p/431476#M281713</link>
      <description>&lt;P&gt;For your variables you could also just use a different LABEL statement.&lt;/P&gt;
&lt;P&gt;The var='label' in the body of a table statement is an override meaning that it replaces the default value that would occur. With variable that means a label if defined or the variable name if not.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you are going to have multiple table statements in the same procedure call and want that change in most places then use the Label statement to move the text out of the table statement an make it easier to read. You could still override per table though.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Similarly the KEYLABEL will let you change the default label of the statistics.&lt;/P&gt;
&lt;P&gt;KEYWORD sum='Total ($)'; for instance could be useful if you are summing a lot of currency type variables. You could still override for specific sums in the body of the table definition.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Sometimes it helps to move stuff out of the table definition as debugging code may get messy when you have many&amp;nbsp;labels, formats, style elements and such.&lt;/P&gt;</description>
      <pubDate>Fri, 26 Jan 2018 22:37:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-TABULATE-Labeling-my-column/m-p/431476#M281713</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-01-26T22:37:44Z</dc:date>
    </item>
  </channel>
</rss>

