<?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 compare with up and down arrow for (Growth or loss) in proc tabulate or report in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/How-to-compare-with-up-and-down-arrow-for-Growth-or-loss-in-proc/m-p/518006#M3475</link>
    <description>&lt;P&gt;Hi While am using that code showing below error.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 03 Dec 2018 10:47:21 GMT</pubDate>
    <dc:creator>srinivaschary</dc:creator>
    <dc:date>2018-12-03T10:47:21Z</dc:date>
    <item>
      <title>How to compare with up and down arrow for (Growth or loss) in proc tabulate or report</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-compare-with-up-and-down-arrow-for-Growth-or-loss-in-proc/m-p/517999#M3473</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;My data is like below i need to compare last month and current month data and need to highlight with up arrow or down arrow for growth or loss please provide the code thanks in advance&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data input&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Month&lt;/TD&gt;&lt;TD&gt;Location&lt;/TD&gt;&lt;TD&gt;Stores&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;11/1/2018&lt;/TD&gt;&lt;TD&gt;Chennai&lt;/TD&gt;&lt;TD&gt;16&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;11/1/2018&lt;/TD&gt;&lt;TD&gt;Hyderabad&lt;/TD&gt;&lt;TD&gt;12&lt;/TD&gt;&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&lt;P&gt;Expected output:&lt;/P&gt;&lt;P&gt;attached image file&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 03 Dec 2018 10:08:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-compare-with-up-and-down-arrow-for-Growth-or-loss-in-proc/m-p/517999#M3473</guid>
      <dc:creator>srinivaschary</dc:creator>
      <dc:date>2018-12-03T10:08:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to compare with up and down arrow for (Growth or loss) in proc tabulate or report</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-compare-with-up-and-down-arrow-for-Growth-or-loss-in-proc/m-p/518003#M3474</link>
      <description>&lt;P&gt;Not here to type in test data, so just some example code - untested:&lt;/P&gt;
&lt;PRE&gt;proc sort data=have;
  by location month;
run;
proc means data=have;
  var stores;
  by location month;
  output out=inter sum=want;
run;
proc transpose data=inter out=want;
  by location month;
  var want;
  idlabel month;
run;
data want;
  length col $2;
  set want;
  array var{2};
  if var{2} &amp;lt; var{1} then col=cats("^s={font_weight=bold font_color=red}↓ ^s={font_weight=normal font_color=black}",put(var{2},best.));
  else if var{2} &amp;gt; var{1} then col=cats("^s={font_weight=bold font_color=green}↑ ^s={font_weight=normal font_color=black}",put(var{2},best.));
  else col=strip(put(var{2},best.));
run;
ods escapechar="^";
proc report data=want;
  columns _all_;
run;

&lt;/PRE&gt;</description>
      <pubDate>Mon, 03 Dec 2018 10:27:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-compare-with-up-and-down-arrow-for-Growth-or-loss-in-proc/m-p/518003#M3474</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2018-12-03T10:27:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to compare with up and down arrow for (Growth or loss) in proc tabulate or report</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-compare-with-up-and-down-arrow-for-Growth-or-loss-in-proc/m-p/518006#M3475</link>
      <description>&lt;P&gt;Hi While am using that code showing below error.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 03 Dec 2018 10:47:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-compare-with-up-and-down-arrow-for-Growth-or-loss-in-proc/m-p/518006#M3475</guid>
      <dc:creator>srinivaschary</dc:creator>
      <dc:date>2018-12-03T10:47:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to compare with up and down arrow for (Growth or loss) in proc tabulate or report</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-compare-with-up-and-down-arrow-for-Growth-or-loss-in-proc/m-p/518009#M3478</link>
      <description>&lt;P&gt;You will need to get the special character to the output somehow, as you are not using a unicode system (and why not?) then you would need to push the symbol out some other way, maybe:&lt;/P&gt;
&lt;PRE&gt;proc sort data=have;
  by location month;
run;
proc means data=have;
  var stores;
  by location month;
  output out=inter sum=want;
run;
proc transpose data=inter out=want;
  by location month;
  var want;
  idlabel month;
run;
data want;
  length col $2;
  set want;
  array var{2};
  if var{2} &amp;lt; var{1} then col=cats("^s={font_weight=bold font_color=red}^{unicode 28A9} ^s={font_weight=normal font_color=black}",put(var{2},best.));
  else if var{2} &amp;gt; var{1} then col=cats("^s={font_weight=bold font_color=green}^{unicode 26A9} ^s={font_weight=normal font_color=black}",put(var{2},best.));
  else col=strip(put(var{2},best.));
run;
ods escapechar="^";
proc report data=want;
  columns _all_;
run;&lt;/PRE&gt;</description>
      <pubDate>Mon, 03 Dec 2018 10:52:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-compare-with-up-and-down-arrow-for-Growth-or-loss-in-proc/m-p/518009#M3478</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2018-12-03T10:52:54Z</dc:date>
    </item>
  </channel>
</rss>

