<?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: proc format in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Building-format-from-Univariate-output/m-p/784150#M250184</link>
    <description>&lt;P&gt;So this means that 30+ percent of your population have a zero value. I would discard the lower percentiles having a zero value:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data p_long2;
set p_long;
by col1,
if last.col1;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Sun, 05 Dec 2021 08:48:47 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2021-12-05T08:48:47Z</dc:date>
    <item>
      <title>Building format from Univariate output</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Building-format-from-Univariate-output/m-p/784142#M250179</link>
      <description>&lt;P&gt;Hello&lt;/P&gt;
&lt;P&gt;I am using proc univariate to&amp;nbsp; calculate percentiles 10,20,30,40,50,60,70,80,90,100&lt;/P&gt;
&lt;P&gt;The outcome data set is called pctls&amp;nbsp; and is getting the values&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Data pctls;
input REVENUEpct10	REVENUEpct20	REVENUEpct30	REVENUEpct40	REVENUEpct50	REVENUEpct60	REVENUEpct70	REVENUEpct80	REVENUEpct90	REVENUEpct100;
cards;
0	0	0	4	94.4325	1642.59	7241.93	18418.335	44282.98	27846721.81
;
Run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Then I want to build formats&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
proc transpose
  data=pctls
  out=p_long;
var _all_;
run;


data cntlin;
set p_long;
length label $100.;
fmtname = "RevenueFmt";
type = "N";
start = ifn(_n_ = 1,0,lag(col1));
end = col1;
label = catx(" ","group_Revenue",_n_,"start:",start,"end:",end);
keep fmtname type start end label;
run;


proc format cntlin=cntlin;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;The problem is values 0-0 are overlapped.&lt;/P&gt;
&lt;P&gt;What do you suggest to do in order to solve this problem and build the format well?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 07 Dec 2021 07:06:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Building-format-from-Univariate-output/m-p/784142#M250179</guid>
      <dc:creator>Ronein</dc:creator>
      <dc:date>2021-12-07T07:06:16Z</dc:date>
    </item>
    <item>
      <title>Re: proc format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Building-format-from-Univariate-output/m-p/784150#M250184</link>
      <description>&lt;P&gt;So this means that 30+ percent of your population have a zero value. I would discard the lower percentiles having a zero value:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data p_long2;
set p_long;
by col1,
if last.col1;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 05 Dec 2021 08:48:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Building-format-from-Univariate-output/m-p/784150#M250184</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2021-12-05T08:48:47Z</dc:date>
    </item>
    <item>
      <title>Re: proc format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Building-format-from-Univariate-output/m-p/784203#M250214</link>
      <description>PROC RANK with GROUPS=10 will put your data into deciles directly.&lt;BR /&gt;&lt;BR /&gt;EG.&lt;BR /&gt;&lt;BR /&gt;proc sort data=sashelp.cars out=cars;&lt;BR /&gt;by mpg_city;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;proc rank data=cars groups=10 out=want;&lt;BR /&gt;var mpg_city;&lt;BR /&gt;ranks rank_mpg;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;Now the variable rank_mpg has your data ranked into deciles from 0 to 9 for your ten groups. &lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.4/proc/p16s2o8e4bnqrin1phywxdaxqba7.htm" target="_blank"&gt;https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.4/proc/p16s2o8e4bnqrin1phywxdaxqba7.htm&lt;/A&gt;&lt;BR /&gt;</description>
      <pubDate>Sun, 05 Dec 2021 19:15:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Building-format-from-Univariate-output/m-p/784203#M250214</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2021-12-05T19:15:30Z</dc:date>
    </item>
  </channel>
</rss>

