<?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 Add commas to dollar value in PROC REPORT in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Add-commas-to-dollar-value-in-PROC-REPORT/m-p/445574#M111679</link>
    <description>&lt;P&gt;I am not having much luck applying a format to a specific value in a column in PROC REPORT. In my case, I have different metrics that have different forms (some are percentages, for example, and others are dollar values).&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, when I run the following code, my dollar figures are in the form $XXXXXXXXX.XX. I seem to be missing something, and I can't seem to find an answer in the documentation. (I get the same error when I try to apply the format in PROC PRINT, by the way).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc report nowd data=work.bot_test4;
	column metrics combined_value source;
	compute combined_value;
	if substr(metrics, 1, 1)= "$" then do;
 		call define(_col_,'format','Dollar14.2');
      end;
   endcomp;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 14 Mar 2018 18:27:12 GMT</pubDate>
    <dc:creator>svh</dc:creator>
    <dc:date>2018-03-14T18:27:12Z</dc:date>
    <item>
      <title>Add commas to dollar value in PROC REPORT</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Add-commas-to-dollar-value-in-PROC-REPORT/m-p/445574#M111679</link>
      <description>&lt;P&gt;I am not having much luck applying a format to a specific value in a column in PROC REPORT. In my case, I have different metrics that have different forms (some are percentages, for example, and others are dollar values).&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, when I run the following code, my dollar figures are in the form $XXXXXXXXX.XX. I seem to be missing something, and I can't seem to find an answer in the documentation. (I get the same error when I try to apply the format in PROC PRINT, by the way).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc report nowd data=work.bot_test4;
	column metrics combined_value source;
	compute combined_value;
	if substr(metrics, 1, 1)= "$" then do;
 		call define(_col_,'format','Dollar14.2');
      end;
   endcomp;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Mar 2018 18:27:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Add-commas-to-dollar-value-in-PROC-REPORT/m-p/445574#M111679</guid>
      <dc:creator>svh</dc:creator>
      <dc:date>2018-03-14T18:27:12Z</dc:date>
    </item>
    <item>
      <title>Re: Add commas to dollar value in PROC REPORT</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Add-commas-to-dollar-value-in-PROC-REPORT/m-p/445579#M111680</link>
      <description>&lt;P&gt;One possibility is that you don't have a wide enough format.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Instead of dollar14.2, try dollar20.2&lt;/P&gt;</description>
      <pubDate>Wed, 14 Mar 2018 18:32:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Add-commas-to-dollar-value-in-PROC-REPORT/m-p/445579#M111680</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2018-03-14T18:32:35Z</dc:date>
    </item>
  </channel>
</rss>

