<?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 make currency values beneath a given value show &amp;quot;&amp;lt; $ #&amp;quot; without SAS erroring in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-make-currency-values-beneath-a-given-value-show-quot-lt/m-p/837085#M330986</link>
    <description>&lt;P&gt;Making values display differently is quite often the role of a custom format. Create an appropriate format and assign it when creating output such as with Proc Print, Report or other procedure.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;A rough example:&lt;/P&gt;
&lt;PRE&gt;proc format;
value mydollar
0 -&amp;lt;10000 = "&amp;lt;$10,000"
10000 - high = [dollar12.]
;

data example;
   input x;
datalines ;
1
100
1900
12345678
;

proc print data=example;
   format x mydollar.;
run;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There are many things that can be done with formats. One thing is you can specify a format in different calls using the same data to see the effect. Groups created by formats will be honored by reports, analysis and most graphing activities.&lt;/P&gt;</description>
    <pubDate>Thu, 06 Oct 2022 01:03:18 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2022-10-06T01:03:18Z</dc:date>
    <item>
      <title>How to make currency values beneath a given value show "&lt; $ #" without SAS erroring due to data type</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-make-currency-values-beneath-a-given-value-show-quot-lt/m-p/837079#M330985</link>
      <description>&lt;P&gt;I am trying to make some data less identifiable by using a case/when/then statement so that values beneath $10,000 output as &amp;lt;$10,000. However, SAS errors as "Result of WHEN clause 2 is not the same data type as the preceding results" - i.e., I assume it is a text string and not a numeric value due to the "&amp;lt;" symbol.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does anyone have any ideas of how to work around this? (Other than letting it equal an extremely specific number and then using formulae in Excel afterwards to target that value).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Example code in my PROC SQL statement below&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SAS_Brizvegas_0-1665017190774.png" style="width: 527px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/75936i5164CE43D9661AA1/image-dimensions/527x68?v=v2" width="527" height="68" role="button" title="SAS_Brizvegas_0-1665017190774.png" alt="SAS_Brizvegas_0-1665017190774.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Oct 2022 00:47:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-make-currency-values-beneath-a-given-value-show-quot-lt/m-p/837079#M330985</guid>
      <dc:creator>SAS_Brizvegas</dc:creator>
      <dc:date>2022-10-06T00:47:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to make currency values beneath a given value show "&lt; $ #" without SAS erroring</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-make-currency-values-beneath-a-given-value-show-quot-lt/m-p/837085#M330986</link>
      <description>&lt;P&gt;Making values display differently is quite often the role of a custom format. Create an appropriate format and assign it when creating output such as with Proc Print, Report or other procedure.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;A rough example:&lt;/P&gt;
&lt;PRE&gt;proc format;
value mydollar
0 -&amp;lt;10000 = "&amp;lt;$10,000"
10000 - high = [dollar12.]
;

data example;
   input x;
datalines ;
1
100
1900
12345678
;

proc print data=example;
   format x mydollar.;
run;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There are many things that can be done with formats. One thing is you can specify a format in different calls using the same data to see the effect. Groups created by formats will be honored by reports, analysis and most graphing activities.&lt;/P&gt;</description>
      <pubDate>Thu, 06 Oct 2022 01:03:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-make-currency-values-beneath-a-given-value-show-quot-lt/m-p/837085#M330986</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2022-10-06T01:03:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to make currency values beneath a given value show "&lt; $ #" without SAS erroring</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-make-currency-values-beneath-a-given-value-show-quot-lt/m-p/837092#M330988</link>
      <description>&lt;P&gt;Thank you very much &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; Greatly appreciated!&lt;/P&gt;</description>
      <pubDate>Thu, 06 Oct 2022 01:51:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-make-currency-values-beneath-a-given-value-show-quot-lt/m-p/837092#M330988</guid>
      <dc:creator>SAS_Brizvegas</dc:creator>
      <dc:date>2022-10-06T01:51:28Z</dc:date>
    </item>
  </channel>
</rss>

