<?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: format multilabel all values in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/format-multilabel-all-values/m-p/128545#M35114</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Just put LOW - HIGH = TOTAL to include all values.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 30 May 2012 08:40:10 GMT</pubDate>
    <dc:creator>Keith</dc:creator>
    <dc:date>2012-05-30T08:40:10Z</dc:date>
    <item>
      <title>format multilabel all values</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/format-multilabel-all-values/m-p/128542#M35111</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV id="gmBabelFish" style="border: 1px solid black; display: none; position: absolute; background-color: #a8ecff; padding: 2px; font-size: 12px; color: black; text-align: left; z-index: 100;"&gt;&lt;DIV style="border-bottom: 1px dotted black; padding-bottom: 2px; padding-top: 2px;"&gt;&lt;SPAN class="gmBabelMousishToolBar" style="cursor: pointer;" title="Close babel mousish"&gt;x&lt;/SPAN&gt;&lt;SPAN class="gmBabelMousishToolBar" style="cursor: pointer;" title="Configure languange"&gt;c&lt;/SPAN&gt;&lt;SPAN class="gmBabelMousishToolBar" style="cursor: default;" title="From English To Italian"&gt;&lt;SPAN class="gmBabelMousishToolBar" style="cursor: default;" title="From English To Italian"&gt;en &amp;gt; i&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;P&gt;proc format;&lt;/P&gt;&lt;P&gt;value $clfmt (multilabel)&lt;/P&gt;&lt;P&gt;'a','b','c','d','e'='Normal'&lt;/P&gt;&lt;P&gt;other='other'&lt;/P&gt;&lt;P&gt;all='Total'&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;SPAN class="gmBabelMousishToolBar" style="cursor: default;" title="From English To Italian"&gt;t&lt;/SPAN&gt;&lt;IMG align="middle" src="https://communities.sas.com/" style="cursor: pointer;" title="click to translate" /&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;I would like to build a multilabel format with one category that contains all the possible values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In other terms I'm trying to code something like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc format;&lt;/P&gt;&lt;P&gt;value $clfmt (multilabel)&lt;/P&gt;&lt;P&gt;'a','b','c','d','e'='Normal'&lt;/P&gt;&lt;P&gt;other='other'&lt;/P&gt;&lt;P&gt;all='Total'&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;however this seems not to work properly&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data one;&lt;/P&gt;&lt;P&gt;case='a'; output;&lt;/P&gt;&lt;P&gt;case='b'; output;&lt;/P&gt;&lt;P&gt;case='c'; output;&lt;/P&gt;&lt;P&gt;case='d'; output;&lt;/P&gt;&lt;P&gt;case='e'; output;&lt;/P&gt;&lt;P&gt;case='z'; output;&lt;/P&gt;&lt;P&gt;case='x'; output;&lt;/P&gt;&lt;P&gt;case='a'; output;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data two;&lt;/P&gt;&lt;P&gt;set one;&lt;/P&gt;&lt;P&gt;count=1;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc format;&lt;/P&gt;&lt;P&gt;value $clfmt (multilabel)&lt;/P&gt;&lt;P&gt;'a','b','c','d','e'='Normal'&lt;/P&gt;&lt;P&gt;other='other'&lt;/P&gt;&lt;P&gt;all='Total'&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc tabulate data=two;&lt;/P&gt;&lt;P&gt;class case /mlf;&lt;/P&gt;&lt;P&gt;var count;&lt;/P&gt;&lt;P&gt;tables case,count*sum='';&lt;/P&gt;&lt;P&gt;format case $clfmt.;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thank you in advance for any suggestions&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 May 2012 16:07:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/format-multilabel-all-values/m-p/128542#M35111</guid>
      <dc:creator>ciro</dc:creator>
      <dc:date>2012-05-29T16:07:11Z</dc:date>
    </item>
    <item>
      <title>Re: format multilabel all values</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/format-multilabel-all-values/m-p/128543#M35112</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try using the all in proc tabulate...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc tabulate data=two;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;class case /mlf;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;var count;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tables case &lt;STRONG&gt;all='Total'&lt;/STRONG&gt;,count*sum='';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;format case $clfmt.;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;--------------------------------------------&#xD;
Edit:&#xD;
&#xD;
I'm not sure the "ALL" is part of proc format, I've only ever seen the other used. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 May 2012 17:03:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/format-multilabel-all-values/m-p/128543#M35112</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2012-05-29T17:03:25Z</dc:date>
    </item>
    <item>
      <title>Re: format multilabel all values</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/format-multilabel-all-values/m-p/128544#M35113</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV id="gmBabelFish" style="border: 1px solid black; display: none; position: absolute; background-color: #a8ecff; padding: 2px; font-size: 12px; color: black; text-align: left; z-index: 100;"&gt;&lt;DIV style="border-bottom: 1px dotted black; padding-bottom: 2px; padding-top: 2px;"&gt;&lt;SPAN class="gmBabelMousishToolBar" style="cursor: pointer;" title="Close babel mousish"&gt;x&lt;/SPAN&gt;&lt;SPAN class="gmBabelMousishToolBar" style="cursor: pointer;" title="Configure languange"&gt;c&lt;/SPAN&gt;&lt;SPAN class="gmBabelMousishToolBar" style="cursor: default;" title="From English To Italian"&gt;en &amp;gt; it&lt;/SPAN&gt;&lt;IMG align="middle" src="https://communities.sas.com/" style="cursor: pointer;" title="click to translate" /&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;thank you very much reeza for your answer, but I would like to find a multilabel format solution, as I need to output different subtotals. Actually it seems that "all" is not acceptable in proc format&lt;/P&gt;&lt;P&gt;I have also tried the following &lt;/P&gt;&lt;P&gt;proc format;&lt;/P&gt;&lt;P&gt;value $clfmt (multilabel)&lt;/P&gt;&lt;P&gt;'a','b','c','d','e'='Normal'&lt;/P&gt;&lt;P&gt;other='other'&lt;/P&gt;&lt;P&gt;'a','b','c','d','e',other='Total'&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;but sas gives me the following error:&lt;/P&gt;&lt;P&gt;The OTHER= clause can only appear once in a format definition.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the problem is I don't know in advance which other values the variable, in my real situation, may assume.&lt;/P&gt;&lt;P&gt;any other suggestions from the community?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 May 2012 07:42:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/format-multilabel-all-values/m-p/128544#M35113</guid>
      <dc:creator>ciro</dc:creator>
      <dc:date>2012-05-30T07:42:53Z</dc:date>
    </item>
    <item>
      <title>Re: format multilabel all values</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/format-multilabel-all-values/m-p/128545#M35114</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Just put LOW - HIGH = TOTAL to include all values.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 May 2012 08:40:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/format-multilabel-all-values/m-p/128545#M35114</guid>
      <dc:creator>Keith</dc:creator>
      <dc:date>2012-05-30T08:40:10Z</dc:date>
    </item>
    <item>
      <title>Re: format multilabel all values</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/format-multilabel-all-values/m-p/128546#M35115</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thanks keith. I simply didn't think to low-high.&lt;/P&gt;&lt;P&gt;there is one more problem though as when I tabulate with the following format&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc format;&lt;/P&gt;&lt;P&gt;value $clfmt (multilabel)&lt;/P&gt;&lt;P&gt;'a','b','c','d','e'='Normal'&lt;/P&gt;&lt;P&gt;other='Odd'&lt;/P&gt;&lt;P&gt;low-high='Total'&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;proc tabulate data=two;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;class case /mlf;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;var count;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;tables case,count*sum='';&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;format case $clfmt.;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;run;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;it does not produce the category "Odd".&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;Is anything wrong with my code or it is simply not possible to use the Other expression with multilabel?&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;any workaround?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 May 2012 18:15:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/format-multilabel-all-values/m-p/128546#M35115</guid>
      <dc:creator>ciro</dc:creator>
      <dc:date>2012-05-30T18:15:29Z</dc:date>
    </item>
    <item>
      <title>Re: format multilabel all values</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/format-multilabel-all-values/m-p/128547#M35116</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes. I also notice that SAS LOG complain the range other cann't reach .&lt;/P&gt;&lt;P&gt;There is a workaround is firstly hold these other values in a macro variable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;data one;
_case='a'; output;
_case='b'; output;
_case='c'; output;
_case='d'; output;
_case='e'; output;
_case='z'; output;
_case='x'; output;
_case='a'; output;
run;

 

data two;
set one;
count=1;
run;
proc sql noprint;
 select distinct quote(strip(_case)) into : other separated by ',' 
&amp;nbsp; from one
&amp;nbsp;&amp;nbsp; where _case not in ('a','b','c','d','e');
quit;


proc format;
value $clfmt (multilabel)
'a','b','c','d','e'='Normal'
&amp;amp;other ='Other'
low-high='Total'
;
run;

proc tabulate data=two;
class _case /mlf;
var count;
tables _case,count*sum='';
format _case $clfmt.;
run;

&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ksharp&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 May 2012 03:14:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/format-multilabel-all-values/m-p/128547#M35116</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2012-05-31T03:14:52Z</dc:date>
    </item>
    <item>
      <title>Re: format multilabel all values</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/format-multilabel-all-values/m-p/128548#M35117</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I believe the problem arises because SAS treats 'Other' as the final category of the format, irrespective of where it is placed.&amp;nbsp; Therefore low-high will be processed beforehand, resulting in no possible values for 'Other'.&amp;nbsp; You therefore need a workaround such as that suggested by @Ksharp.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 May 2012 09:02:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/format-multilabel-all-values/m-p/128548#M35117</guid>
      <dc:creator>Keith</dc:creator>
      <dc:date>2012-05-31T09:02:17Z</dc:date>
    </item>
    <item>
      <title>Re: format multilabel all values</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/format-multilabel-all-values/m-p/128549#M35118</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The below code might be another workaround.&lt;/P&gt;&lt;P&gt;Pre-specified values are excluded from low-high range and put into 'Other' bucket.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Zafer&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data one;&lt;/P&gt;&lt;P&gt;retain count 1;&lt;/P&gt;&lt;P&gt;case='a'; output;&lt;/P&gt;&lt;P&gt;case='b'; output;&lt;/P&gt;&lt;P&gt;case='c'; output;&lt;/P&gt;&lt;P&gt;case='d'; output;&lt;/P&gt;&lt;P&gt;case='e'; output;&lt;/P&gt;&lt;P&gt;case='z'; output;&lt;/P&gt;&lt;P&gt;case='x'; output;&lt;/P&gt;&lt;P&gt;case='a'; output;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc format;&lt;/P&gt;&lt;P&gt;value $cfmt (multilabel)&lt;/P&gt;&lt;P&gt;'a','b','c','d','e'='Normal'&lt;/P&gt;&lt;P&gt;low -&amp;lt; 'a',&lt;/P&gt;&lt;P&gt;'a' &amp;lt;-&amp;lt; 'b', &lt;/P&gt;&lt;P&gt;'b' &amp;lt;-&amp;lt; 'c', &lt;/P&gt;&lt;P&gt;'c' &amp;lt;-&amp;lt; 'd', &lt;/P&gt;&lt;P&gt;'d' &amp;lt;-&amp;lt; 'e',&lt;/P&gt;&lt;P&gt;'e' &amp;lt;-high= 'Other'&lt;/P&gt;&lt;P&gt;low-high = 'Total';&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc tabulate data=one;&lt;/P&gt;&lt;P&gt;class case /mlf ;&lt;/P&gt;&lt;P&gt;var count;&lt;/P&gt;&lt;P&gt;tables case,count*sum='';&lt;/P&gt;&lt;P&gt;format case $cfmt.;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 May 2012 12:54:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/format-multilabel-all-values/m-p/128549#M35118</guid>
      <dc:creator>Alpay</dc:creator>
      <dc:date>2012-05-31T12:54:04Z</dc:date>
    </item>
    <item>
      <title>Re: format multilabel all values</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/format-multilabel-all-values/m-p/128550#M35119</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thank you to all fro the answers. I've learned something from each of them&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 May 2012 21:34:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/format-multilabel-all-values/m-p/128550#M35119</guid>
      <dc:creator>ciro</dc:creator>
      <dc:date>2012-05-31T21:34:45Z</dc:date>
    </item>
  </channel>
</rss>

