<?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 obtain different output style in same column of a summary table in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-obtain-different-output-style-in-same-column-of-a-summary/m-p/363343#M23838</link>
    <description>&lt;P&gt;Hi&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If it is for printed output, you can use Proc REPORT and the CALL DEFINE routine to achive this, see example below.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
  input
    Indicator
    Score
;
cards;
1 0.1286
2 1.1096
3 4.853
4 0.3064
;

proc report data=have;
  column indicator score _dummy;
  define indicator / display;
  define score / display;
  define _dummy / computed noprint;

  compute _dummy;
    if indicator = 3 then do;
      call define("score", "format", "8.4");
    end;
    else do;
      call define("score", "format", "percentn9.2");
    end;
  endcomp;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 01 Jun 2017 08:40:58 GMT</pubDate>
    <dc:creator>BrunoMueller</dc:creator>
    <dc:date>2017-06-01T08:40:58Z</dc:date>
    <item>
      <title>How to obtain different output style in same column of a summary table</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-obtain-different-output-style-in-same-column-of-a-summary/m-p/363336#M23835</link>
      <description>&lt;P&gt;Inside my project, I'd like to create a summary table in which I represent for each indicator the score relating to a specific date.&lt;/P&gt;&lt;P&gt;The problem is that the correct data type for almost all indicators is PERCENTN9.2 while for one is 6.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In other words, my output should be&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Indicator&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Score&lt;/P&gt;&lt;P&gt;1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 12,86%&lt;/P&gt;&lt;P&gt;2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 110,96%&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;3&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 4.853&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;4&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 30,64%&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is it possible to obtain this output?&lt;/P&gt;</description>
      <pubDate>Thu, 01 Jun 2017 07:55:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-obtain-different-output-style-in-same-column-of-a-summary/m-p/363336#M23835</guid>
      <dc:creator>Bene20</dc:creator>
      <dc:date>2017-06-01T07:55:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to obtain different output style in same column of a summary table</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-obtain-different-output-style-in-same-column-of-a-summary/m-p/363339#M23836</link>
      <description>&lt;P&gt;Yes. What youwould do is create a character variable (remember character variables can hold anything) and then put each of your values into the correct format into there and print that (score_char in the below will contain the mismatched formats):&lt;/P&gt;
&lt;PRE&gt;data want (keep=indicator score_char);
  set have;
  length score_char $200;
  score_char=ifc(indicator=3,put(score,5.3),put(score,percent5.));
run;
&lt;/PRE&gt;</description>
      <pubDate>Thu, 01 Jun 2017 08:12:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-obtain-different-output-style-in-same-column-of-a-summary/m-p/363339#M23836</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2017-06-01T08:12:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to obtain different output style in same column of a summary table</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-obtain-different-output-style-in-same-column-of-a-summary/m-p/363343#M23838</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If it is for printed output, you can use Proc REPORT and the CALL DEFINE routine to achive this, see example below.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
  input
    Indicator
    Score
;
cards;
1 0.1286
2 1.1096
3 4.853
4 0.3064
;

proc report data=have;
  column indicator score _dummy;
  define indicator / display;
  define score / display;
  define _dummy / computed noprint;

  compute _dummy;
    if indicator = 3 then do;
      call define("score", "format", "8.4");
    end;
    else do;
      call define("score", "format", "percentn9.2");
    end;
  endcomp;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 01 Jun 2017 08:40:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-obtain-different-output-style-in-same-column-of-a-summary/m-p/363343#M23838</guid>
      <dc:creator>BrunoMueller</dc:creator>
      <dc:date>2017-06-01T08:40:58Z</dc:date>
    </item>
  </channel>
</rss>

