<?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: How to display labels for variables without variable name showing in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/How-to-display-labels-for-variables-without-variable-name/m-p/888953#M82885</link>
    <description>&lt;P&gt;Thank you, this code worked for displaying the labels the way I hoped to!&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="fastandcurious_0-1691766329070.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/86675i84F2BCEEC4C13C67/image-size/medium?v=v2&amp;amp;px=400" role="button" title="fastandcurious_0-1691766329070.png" alt="fastandcurious_0-1691766329070.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 11 Aug 2023 15:05:51 GMT</pubDate>
    <dc:creator>fastandcurious</dc:creator>
    <dc:date>2023-08-11T15:05:51Z</dc:date>
    <item>
      <title>How to display labels for variables without variable name showing</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-display-labels-for-variables-without-variable-name/m-p/888942#M82881</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;I created formats and labels for my variables, but when I create tables, the variable name (ex: newrace) is displaying in addition to the label I created. I want only the label to show (ex: Race) and I am not sure what I'm doing wrong?&lt;/P&gt;
&lt;P&gt;[My formatted values appear the way I want them to and replace their values of 1 and 0 (ex: Yes No)]&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Data library.dataset;&lt;BR /&gt;set dataset;&lt;BR /&gt;Label&lt;BR /&gt;sad="Sad for 2 or more weeks during the past 12 months"&lt;/P&gt;
&lt;P&gt;newrace="Race"&lt;/P&gt;
&lt;P&gt;;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;proc freq data=library.datasetorder=freq;&lt;BR /&gt;format newrace race. sad yesno.;&lt;BR /&gt;table newrace*sad;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="fastandcurious_0-1691760750864.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/86672i1EB612F732BC889C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="fastandcurious_0-1691760750864.png" alt="fastandcurious_0-1691760750864.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 11 Aug 2023 13:41:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-display-labels-for-variables-without-variable-name/m-p/888942#M82881</guid>
      <dc:creator>fastandcurious</dc:creator>
      <dc:date>2023-08-11T13:41:53Z</dc:date>
    </item>
    <item>
      <title>Re: How to display labels for variables without variable name showing</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-display-labels-for-variables-without-variable-name/m-p/888944#M82882</link>
      <description>Use TABULATE procedure instead, you have more control there.</description>
      <pubDate>Fri, 11 Aug 2023 14:17:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-display-labels-for-variables-without-variable-name/m-p/888944#M82882</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2023-08-11T14:17:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to display labels for variables without variable name showing</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-display-labels-for-variables-without-variable-name/m-p/888945#M82883</link>
      <description>&lt;P&gt;If you must use proc freq, and custom reporting is better done in either Proc Tabulate or Report, you would have to modify the ODS templates that the procedure uses and would likely mean more than one as one-way frequency and two-way frequency tables differ.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;An example:&lt;/P&gt;
&lt;PRE&gt;proc tabulate data=library.dataset;
   class newrace /order=freq;
   class sad;
   format newrace race. sad yesno.;
   table newrace all='Total',
         (sad all='Total') * (n='Count' pctn='table %')
         ;
run;&lt;/PRE&gt;
&lt;P&gt;Proc tabulate will display the label, if one is defined, by default and no variable name. You can modify the displayed label in use with the overide variable='some text' in a table statement as shown with the statistics. The ALL is to get a summary of the combined class variable.&amp;nbsp; Note that the comma is used to separate dimensions. In the example the first dimension is only the newrace variable. If you also, for example, had an Age variable on the same line you would have a single table with race values above the age values. The * is used to nest variables and/or statistics and ( ) create a display group treated together. If you used something like newrace*age you would get each age as a row within a race category.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 11 Aug 2023 14:34:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-display-labels-for-variables-without-variable-name/m-p/888945#M82883</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2023-08-11T14:34:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to display labels for variables without variable name showing</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-display-labels-for-variables-without-variable-name/m-p/888947#M82884</link>
      <description>Thank you for this example and feedback, I'll try proc tabulate and report and share the results. I am not as familiar with them but it sounds like the best way to get labels in the output</description>
      <pubDate>Fri, 11 Aug 2023 14:38:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-display-labels-for-variables-without-variable-name/m-p/888947#M82884</guid>
      <dc:creator>fastandcurious</dc:creator>
      <dc:date>2023-08-11T14:38:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to display labels for variables without variable name showing</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-display-labels-for-variables-without-variable-name/m-p/888953#M82885</link>
      <description>&lt;P&gt;Thank you, this code worked for displaying the labels the way I hoped to!&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="fastandcurious_0-1691766329070.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/86675i84F2BCEEC4C13C67/image-size/medium?v=v2&amp;amp;px=400" role="button" title="fastandcurious_0-1691766329070.png" alt="fastandcurious_0-1691766329070.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 11 Aug 2023 15:05:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-display-labels-for-variables-without-variable-name/m-p/888953#M82885</guid>
      <dc:creator>fastandcurious</dc:creator>
      <dc:date>2023-08-11T15:05:51Z</dc:date>
    </item>
  </channel>
</rss>

