<?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: Showing numbers in millions (tagattr) in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Showing-numbers-in-millions-tagattr/m-p/536514#M147440</link>
    <description>&lt;P&gt;Thats not a tagset issue.&amp;nbsp; If you want to display data differently, then either correct the data in a datastep before reporting, i.e.&lt;/P&gt;
&lt;PRE&gt;if value &amp;lt; 1000000 then value=0;&lt;/PRE&gt;
&lt;P&gt;Or apply a format to the variable which has something like;&lt;/P&gt;
&lt;PRE&gt;proc format;
  value r
    low-1000000="0";
run;
data want;
  set have;
  format value r.;
run;&lt;/PRE&gt;</description>
    <pubDate>Mon, 18 Feb 2019 15:27:39 GMT</pubDate>
    <dc:creator>RW9</dc:creator>
    <dc:date>2019-02-18T15:27:39Z</dc:date>
    <item>
      <title>Showing numbers in millions (tagattr)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Showing-numbers-in-millions-tagattr/m-p/536504#M147439</link>
      <description>&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;I am using&amp;nbsp;&lt;/FONT&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;&lt;FONT color="#0000ff" size="3"&gt;ODS &lt;/FONT&gt;&lt;FONT size="3"&gt;tagsets.excelxp with the below code &lt;/FONT&gt;to show the output in&amp;nbsp;excel. I'm using this format to show the numbers in millions.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;Example: &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;9416016 as 9&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;-1158933 as -1&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How can I show the below positive and negative numbers&amp;nbsp;that are less than million&amp;nbsp;as ZERO.&lt;/P&gt;
&lt;P&gt;-160231&amp;nbsp;should be shown as 0&amp;nbsp;&lt;/P&gt;
&lt;P&gt;160231&amp;nbsp; should be shown as 0&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;&lt;FONT size="3"&gt;call define("&amp;amp;&amp;amp;allperiod&amp;amp;i", 'style', 'style={background=&amp;amp;colour4 width=1 tagattr="format:#,###,,;-#,###,,;-"}');&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Feb 2019 14:56:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Showing-numbers-in-millions-tagattr/m-p/536504#M147439</guid>
      <dc:creator>Sanjay_M</dc:creator>
      <dc:date>2019-02-18T14:56:37Z</dc:date>
    </item>
    <item>
      <title>Re: Showing numbers in millions (tagattr)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Showing-numbers-in-millions-tagattr/m-p/536514#M147440</link>
      <description>&lt;P&gt;Thats not a tagset issue.&amp;nbsp; If you want to display data differently, then either correct the data in a datastep before reporting, i.e.&lt;/P&gt;
&lt;PRE&gt;if value &amp;lt; 1000000 then value=0;&lt;/PRE&gt;
&lt;P&gt;Or apply a format to the variable which has something like;&lt;/P&gt;
&lt;PRE&gt;proc format;
  value r
    low-1000000="0";
run;
data want;
  set have;
  format value r.;
run;&lt;/PRE&gt;</description>
      <pubDate>Mon, 18 Feb 2019 15:27:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Showing-numbers-in-millions-tagattr/m-p/536514#M147440</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2019-02-18T15:27:39Z</dc:date>
    </item>
    <item>
      <title>Re: Showing numbers in millions (tagattr)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Showing-numbers-in-millions-tagattr/m-p/536683#M147513</link>
      <description>&lt;P&gt;In excel if you type -160230 in&amp;nbsp; a cell and apply custom format #,##0,, the value shows as zero.&lt;/P&gt;
&lt;P&gt;the display value is shown as zero and for information when you enter the cell it shows the actual value in the formula bar.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am trying to replicate this.&lt;/P&gt;</description>
      <pubDate>Tue, 19 Feb 2019 09:53:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Showing-numbers-in-millions-tagattr/m-p/536683#M147513</guid>
      <dc:creator>Sanjay_M</dc:creator>
      <dc:date>2019-02-19T09:53:37Z</dc:date>
    </item>
    <item>
      <title>Re: Showing numbers in millions (tagattr)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Showing-numbers-in-millions-tagattr/m-p/536685#M147515</link>
      <description>&lt;P&gt;Yes, but that is something which Excel does.&amp;nbsp; Excel is not SAS.&amp;nbsp; When you output from ods tagsets.excelxp what you are actually creating is a text file, which contains your data in XML form, with tags and such like which Excel will read and interpret - this is the key word here = interpret.&amp;nbsp; Excel system is of its own, nothing whatsoever to do with SAS, so how it reads that text file and understands it is its own process.&amp;nbsp; If you want 0 to be displayed for numbers less than a certain value, use one of the two methods given.&amp;nbsp; If you want to use Excel and some Excel specific functions, then invest in learning Excel and VBA.&amp;nbsp; The tagattr, is just more text added to the file which tries to indicate to Excel what to do with the data, if Excel chooses not to do this or ignores it, or does something else, that is really up to it (and another good reason not to use for anything in the first place).&lt;/P&gt;</description>
      <pubDate>Tue, 19 Feb 2019 10:08:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Showing-numbers-in-millions-tagattr/m-p/536685#M147515</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2019-02-19T10:08:03Z</dc:date>
    </item>
  </channel>
</rss>

