<?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 Report Problem with column name in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/PROC-Report-Problem-with-column-name/m-p/777401#M247314</link>
    <description>&lt;P&gt;You simply add the new data to the base table and let PROC REPORT do its work. There is no need to append transposed data (which is not possible anyway, you need to completely rewrite the dataset with a data step).&lt;/P&gt;</description>
    <pubDate>Fri, 29 Oct 2021 20:07:00 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2021-10-29T20:07:00Z</dc:date>
    <item>
      <title>PROC Report Problem with column name</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-Report-Problem-with-column-name/m-p/777179#M247222</link>
      <description>&lt;P&gt;I would like to build a proc report from my date, where it would calculate html / excel mean, median, sum etc. as a separate document. However, the problem is that from the table where I have POLICY_VINTAGE dates like this on below :&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Gieorgie_0-1635492012432.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/65179i6E5CB963E151D648/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Gieorgie_0-1635492012432.png" alt="Gieorgie_0-1635492012432.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;I have to (probably best create) the widetable with PROC TRANSPOSE. With this code,&lt;/P&gt;
&lt;PRE&gt;PROC SQL;   
   create table POLICY_VINTAGE_WEEKLY as
   select 
   POLICY_VINTAGE
  ,count(NRB) as NUMBER_POLICY
  ,2 as Run_Date 
   from PolisyEnd
   where POLIS ="W"
   group by 
   POLICY_VINTAGE
;
Quit;
proc transpose data   = policy_vintage_weekly
               name= Polisy_Active
               out    = work.policy_vintage_weekly;
	   by Run_Date;
    id policy_vintage;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;then the table looks like this:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Gieorgie_1-1635492168950.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/65180iF5763EECD3DAE732/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Gieorgie_1-1635492168950.png" alt="Gieorgie_1-1635492168950.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;When I try to build proc reports I get the error that POLICY_VINTAGE columns are missing, is it because of proc transpose? Do I have to choose all columns? How to make him calculate these indicators for me from the tabe&lt;/P&gt;
&lt;PRE&gt;proc report data= _work.policy_vintage_weekly;
column POLICY_VINTAGE NUMBER_POLICY;
define NUMBER_POLICY/sum;
define NUMBER_POLICY/mean;
run;&lt;/PRE&gt;
&lt;P&gt;ERROR: The variable POLICY_VINTAGE is not in _WORK.POLICY_VINTAGE_WEEKLY.&lt;/P&gt;</description>
      <pubDate>Fri, 29 Oct 2021 07:30:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-Report-Problem-with-column-name/m-p/777179#M247222</guid>
      <dc:creator>Gieorgie</dc:creator>
      <dc:date>2021-10-29T07:30:55Z</dc:date>
    </item>
    <item>
      <title>Re: PROC Report Problem with column name</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-Report-Problem-with-column-name/m-p/777194#M247228</link>
      <description>&lt;P&gt;Mean, median or sum of what exactly? Your data description doesn't provide any likely candidates to do summary statistics on.&lt;/P&gt;
&lt;P&gt;If you have a numeric variable that you want then no need to use proc sql&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Using a data set you should have available this shows how to get a count sum and mean of a variable under columns of another variable:&lt;/P&gt;
&lt;PRE&gt;proc report data=sashelp.class;
   columns sex age,( (n sum mean),weight) ;
   define sex / group;
   define age /across;
run;&lt;/PRE&gt;
&lt;P&gt;It would really help to show some actual example data and what the report is supposed to look like, as in expected structure and maybe small number of values if you can do them by hand.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Your error is because when you use Policy_vintage as an ID variable in proc transpose the values are used in creating names of columns and the variable Policy_vintage, as you even show in the picture, is not in the output data set Policy_vintage_weekly. So it is not there to use in Proc report. You may also want to look at your log&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 29 Oct 2021 08:58:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-Report-Problem-with-column-name/m-p/777194#M247228</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2021-10-29T08:58:17Z</dc:date>
    </item>
    <item>
      <title>Re: PROC Report Problem with column name</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-Report-Problem-with-column-name/m-p/777199#M247231</link>
      <description>&lt;P&gt;Hi, thanks for answear.&lt;/P&gt;
&lt;P&gt;This is my sample data : And i would like create reports where the mean and median would be calculated for each date. I don't know how to create a variable for POLICY_VINTAGE if after transpose it changed the columns to the rotated dates.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Gieorgie_0-1635498731507.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/65186i20A902E926D2FA0E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Gieorgie_0-1635498731507.png" alt="Gieorgie_0-1635498731507.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 29 Oct 2021 09:14:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-Report-Problem-with-column-name/m-p/777199#M247231</guid>
      <dc:creator>Gieorgie</dc:creator>
      <dc:date>2021-10-29T09:14:33Z</dc:date>
    </item>
    <item>
      <title>Re: PROC Report Problem with column name</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-Report-Problem-with-column-name/m-p/777211#M247234</link>
      <description>&lt;P&gt;&lt;STRONG&gt;DO NOT TRANSPOSE YOUR DATA.&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Maxim 19: Long Beats Wide.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Let PROC REPORT do that on its own:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc report data=policy_vintage_weekly;
column run_date policy_vintage,number_policy;
define run_date / group;
define policy_vintage / across;
define number_policy / sum;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;This is just the most basic REPORT code, the procedure has a gazillion of options to get the report into shape.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For detailed help, provide usable example data (your original source, not the useless transposed data) in a data step with datalines, posted in a code box, and an example for the report you want.&lt;/P&gt;</description>
      <pubDate>Fri, 29 Oct 2021 09:41:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-Report-Problem-with-column-name/m-p/777211#M247234</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2021-10-29T09:41:50Z</dc:date>
    </item>
    <item>
      <title>Re: PROC Report Problem with column name</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-Report-Problem-with-column-name/m-p/777212#M247235</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/401093"&gt;@Gieorgie&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hi, thanks for answear.&lt;/P&gt;
&lt;P&gt;This is my sample data : And i would like create reports where the mean and median would be calculated for each date. I don't know how to create a variable for POLICY_VINTAGE if after transpose it changed the columns to the rotated dates.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Gieorgie_0-1635498731507.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/65186i20A902E926D2FA0E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Gieorgie_0-1635498731507.png" alt="Gieorgie_0-1635498731507.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;That's a picture, not data. As a minimum data is text with some description. Better is a data step that creates data similar to yours. You show a data set in the first step.&lt;/P&gt;
&lt;PRE&gt; from PolisyEnd&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;that is probably the one you should share. &lt;/P&gt;
&lt;P&gt;Andy you have not shown 1) what the desired output is or 2) what you actually want to take a count, mean, sum or other summary of.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You may have made a very common mistake of assuming a process needs a specific step, such as Proc Transpose, when it very well may not.&lt;/P&gt;</description>
      <pubDate>Fri, 29 Oct 2021 09:45:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-Report-Problem-with-column-name/m-p/777212#M247235</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2021-10-29T09:45:48Z</dc:date>
    </item>
    <item>
      <title>Re: PROC Report Problem with column name</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-Report-Problem-with-column-name/m-p/777223#M247237</link>
      <description>&lt;P&gt;This is date from PolisEnd some sample. And Run_Date is a release date of the report, it will be for a week. I want to count the medians and mean NUMBER_POLICY for each date.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;TABLE border="1" width="99.91496598639455%"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="38.01020408163265%"&gt;POLICY_VINTAGE&lt;/TD&gt;
&lt;TD width="38.01020408163265%"&gt;NUMBER_POLICY&lt;/TD&gt;
&lt;TD width="23.89455782312925%"&gt;Run_Date&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="38.01020408163265%"&gt;2008-11&lt;/TD&gt;
&lt;TD width="38.01020408163265%"&gt;1&lt;/TD&gt;
&lt;TD width="23.89455782312925%"&gt;10-29-2021&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="38.01020408163265%"&gt;2010-01&lt;/TD&gt;
&lt;TD width="38.01020408163265%"&gt;3&lt;/TD&gt;
&lt;TD width="23.89455782312925%"&gt;10-29-2021&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="38.01020408163265%"&gt;2010-03&lt;/TD&gt;
&lt;TD width="38.01020408163265%"&gt;1&lt;/TD&gt;
&lt;TD width="23.89455782312925%"&gt;10-29-2021&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="38.01020408163265%"&gt;2010-05&lt;/TD&gt;
&lt;TD width="38.01020408163265%"&gt;1&lt;/TD&gt;
&lt;TD width="23.89455782312925%"&gt;10-29-2021&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="38.01020408163265%"&gt;2010-06&lt;/TD&gt;
&lt;TD width="38.01020408163265%"&gt;2&lt;/TD&gt;
&lt;TD width="23.89455782312925%"&gt;
&lt;P&gt;10-29-2021&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And this is sample data from tranpose I decided to transpose because it seems that it is better to collect the results of running the code, where run date is the run date and here I would also like to do mean / median for each date&lt;/P&gt;
&lt;TABLE border="1" width="100%"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="24.762726488352026%" height="30px"&gt;Run_Date&lt;/TD&gt;
&lt;TD width="26.143226919758412%" height="30px"&gt;Polisy_Active&lt;/TD&gt;
&lt;TD width="12.079378774805868%" height="30px"&gt;2008-11&lt;/TD&gt;
&lt;TD width="12.338222605694565%" height="30px"&gt;2010-01&lt;/TD&gt;
&lt;TD width="12.338222605694565%" height="30px"&gt;2010-03&lt;/TD&gt;
&lt;TD width="12.338222605694565%" height="30px"&gt;2010-05&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="24.762726488352026%" height="30px"&gt;1&lt;/TD&gt;
&lt;TD width="26.143226919758412%" height="30px"&gt;NUMBER_POLICY&lt;/TD&gt;
&lt;TD width="12.079378774805868%" height="30px"&gt;1&lt;/TD&gt;
&lt;TD width="12.338222605694565%" height="30px"&gt;3&lt;/TD&gt;
&lt;TD width="12.338222605694565%" height="30px"&gt;1&lt;/TD&gt;
&lt;TD width="12.338222605694565%" height="30px"&gt;1&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="24.762726488352026%" height="30px"&gt;2&lt;/TD&gt;
&lt;TD width="26.143226919758412%" height="30px"&gt;NUMBER_POLICY&lt;/TD&gt;
&lt;TD width="12.079378774805868%" height="30px"&gt;1&lt;/TD&gt;
&lt;TD width="12.338222605694565%" height="30px"&gt;3&lt;/TD&gt;
&lt;TD width="12.338222605694565%" height="30px"&gt;1&lt;/TD&gt;
&lt;TD width="12.338222605694565%" height="30px"&gt;1&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="24.762726488352026%" height="30px"&gt;2&lt;/TD&gt;
&lt;TD width="26.143226919758412%" height="30px"&gt;NUMBER_POLICY&lt;/TD&gt;
&lt;TD width="12.079378774805868%" height="30px"&gt;1&lt;/TD&gt;
&lt;TD width="12.338222605694565%" height="30px"&gt;3&lt;/TD&gt;
&lt;TD width="12.338222605694565%" height="30px"&gt;1&lt;/TD&gt;
&lt;TD width="12.338222605694565%" height="30px"&gt;1&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="24.762726488352026%" height="30px"&gt;22582&lt;/TD&gt;
&lt;TD width="26.143226919758412%" height="30px"&gt;NUMBER_POLICY&lt;/TD&gt;
&lt;TD width="12.079378774805868%" height="30px"&gt;1&lt;/TD&gt;
&lt;TD width="12.338222605694565%" height="30px"&gt;3&lt;/TD&gt;
&lt;TD width="12.338222605694565%" height="30px"&gt;1&lt;/TD&gt;
&lt;TD width="12.338222605694565%" height="30px"&gt;1&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="24.762726488352026%" height="30px"&gt;22582&lt;/TD&gt;
&lt;TD width="26.143226919758412%" height="30px"&gt;NUMBER_POLICY&lt;/TD&gt;
&lt;TD width="12.079378774805868%" height="30px"&gt;1&lt;/TD&gt;
&lt;TD width="12.338222605694565%" height="30px"&gt;3&lt;/TD&gt;
&lt;TD width="12.338222605694565%" height="30px"&gt;1&lt;/TD&gt;
&lt;TD width="12.338222605694565%" height="30px"&gt;1&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&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;&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;&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;&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;&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;&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;&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;&lt;/P&gt;</description>
      <pubDate>Fri, 29 Oct 2021 10:05:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-Report-Problem-with-column-name/m-p/777223#M247237</guid>
      <dc:creator>Gieorgie</dc:creator>
      <dc:date>2021-10-29T10:05:24Z</dc:date>
    </item>
    <item>
      <title>Re: PROC Report Problem with column name</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-Report-Problem-with-column-name/m-p/777229#M247239</link>
      <description>&lt;P&gt;The value of "NUMBER_POLICY" is obviously redundant in your example, so this item should get another place in your report.&lt;/P&gt;
&lt;P&gt;When we say "data step with datalines", we mean THIS:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
input POLICY_VINTAGE : yymmdd10. NUMBER_POLICY Run_Date : mmddyy10.;
format POLICY_VINTAGE yymmd7. Run_Date yymmdd10.;
datalines;
2008-11-01 1 10-29-2021
2010-01-01 3 10-29-2021
2010-03-01 1 10-29-2021
2010-05-01 1 10-29-2021
2010-06-01 2 10-29-2021
;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Everybody can recreate the dataset with a simple copy/paste and submit, without having to second-guess attributes and raw values. We expect you to use this in the future, as a most basic courtesy towards those that are here to help you, for no gain expect the pure fun of it. MAKE IT fun for us.&lt;/P&gt;
&lt;P&gt;Now, from this you can run the following PROC REPORT:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc report data=have;
column run_date number_policy,policy_vintage;
define run_date / group;
define policy_vintage / "Policy_Vintage" across;
define number_policy / "" sum;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;which results in this:&lt;/P&gt;
&lt;PRE&gt; 	Policy_Vintage
Run_Date	2008-11	2010-01	2010-03	2010-05	2010-06
2021-10-29	1	3	1	1	2
&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 29 Oct 2021 10:30:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-Report-Problem-with-column-name/m-p/777229#M247239</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2021-10-29T10:30:24Z</dc:date>
    </item>
    <item>
      <title>Re: PROC Report Problem with column name</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-Report-Problem-with-column-name/m-p/777348#M247288</link>
      <description>&lt;P&gt;I am doing transpose because I want to use proc append to add more results to the main table. However, when I don't use proc transpose. The table looks like this.&lt;/P&gt;
&lt;TABLE border="1" width="99.87531172069825%"&gt;
&lt;TBODY&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD width="38.90274314214464%" height="20" style="height: 15.0pt; width: 48pt;"&gt;POLICY_VINTAGE&lt;/TD&gt;
&lt;TD width="39.02743142144639%" style="width: 48pt;"&gt;NUMBER_POLICY&lt;/TD&gt;
&lt;TD width="21.94513715710723%" style="width: 48pt;"&gt;Run_Date&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD width="38.90274314214464%" height="20" align="right" class="xl63" style="height: 15.0pt;"&gt;2021-01&lt;/TD&gt;
&lt;TD width="39.02743142144639%" align="right"&gt;77&lt;/TD&gt;
&lt;TD width="21.94513715710723%" align="right"&gt;1&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD width="38.90274314214464%" height="20" align="right" class="xl63" style="height: 15.0pt;"&gt;2021-02&lt;/TD&gt;
&lt;TD width="39.02743142144639%" align="right"&gt;101&lt;/TD&gt;
&lt;TD width="21.94513715710723%" align="right"&gt;1&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD width="38.90274314214464%" height="20" align="right" class="xl63" style="height: 15.0pt;"&gt;2021-01&lt;/TD&gt;
&lt;TD width="39.02743142144639%" align="right"&gt;77&lt;/TD&gt;
&lt;TD width="21.94513715710723%" align="right"&gt;2&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD width="38.90274314214464%" height="20" align="right" class="xl63" style="height: 15.0pt;"&gt;2021-02&lt;/TD&gt;
&lt;TD width="39.02743142144639%" align="right"&gt;101&lt;/TD&gt;
&lt;TD width="21.94513715710723%" align="right"&gt;2&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;I would like add to&amp;nbsp; _work.policy_vinatge to be added&amp;nbsp; every time I run the code, the tables next to it and not as subsequent lines, Some like a below :&lt;/P&gt;
&lt;TABLE border="1" width="99.87261146496814%"&gt;
&lt;TBODY&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD width="53.503184713375795%" height="20" style="height: 15.0pt; width: 48pt;"&gt;POLICY_VINTAGE&lt;/TD&gt;
&lt;TD width="23.18471337579618%" align="right" style="width: 48pt;"&gt;1&lt;/TD&gt;
&lt;TD width="23.18471337579618%" align="right" style="width: 48pt;"&gt;2&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD width="53.503184713375795%" height="20" align="right" class="xl65" style="height: 15.0pt;"&gt;2021-01&lt;/TD&gt;
&lt;TD width="23.18471337579618%" align="right"&gt;77&lt;/TD&gt;
&lt;TD width="23.18471337579618%" align="right"&gt;77&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD width="53.503184713375795%" height="20" align="right" class="xl65" style="height: 15.0pt;"&gt;2021-02&lt;/TD&gt;
&lt;TD width="23.18471337579618%" align="right"&gt;101&lt;/TD&gt;
&lt;TD width="23.18471337579618%" align="right"&gt;101&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD width="53.503184713375795%" height="20" align="right" class="xl65" style="height: 15.0pt;"&gt;2021-01&lt;/TD&gt;
&lt;TD width="23.18471337579618%" align="right"&gt;77&lt;/TD&gt;
&lt;TD width="23.18471337579618%" align="right"&gt;77&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD width="53.503184713375795%" height="20" align="right" class="xl65" style="height: 15.0pt;"&gt;2021-02&lt;/TD&gt;
&lt;TD width="23.18471337579618%" align="right"&gt;101&lt;/TD&gt;
&lt;TD width="23.18471337579618%" align="right"&gt;101&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 29 Oct 2021 16:19:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-Report-Problem-with-column-name/m-p/777348#M247288</guid>
      <dc:creator>Gieorgie</dc:creator>
      <dc:date>2021-10-29T16:19:49Z</dc:date>
    </item>
    <item>
      <title>Re: PROC Report Problem with column name</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-Report-Problem-with-column-name/m-p/777401#M247314</link>
      <description>&lt;P&gt;You simply add the new data to the base table and let PROC REPORT do its work. There is no need to append transposed data (which is not possible anyway, you need to completely rewrite the dataset with a data step).&lt;/P&gt;</description>
      <pubDate>Fri, 29 Oct 2021 20:07:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-Report-Problem-with-column-name/m-p/777401#M247314</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2021-10-29T20:07:00Z</dc:date>
    </item>
    <item>
      <title>Re: PROC Report Problem with column name</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-Report-Problem-with-column-name/m-p/777466#M247353</link>
      <description>Ok, but when I add new data to a historical file with proc append, it adds&lt;BR /&gt;me as new lines and I wish it would add as a new column.  How do I change&lt;BR /&gt;my code?&lt;BR /&gt;</description>
      <pubDate>Sat, 30 Oct 2021 07:22:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-Report-Problem-with-column-name/m-p/777466#M247353</guid>
      <dc:creator>Gieorgie</dc:creator>
      <dc:date>2021-10-30T07:22:48Z</dc:date>
    </item>
    <item>
      <title>Re: PROC Report Problem with column name</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-Report-Problem-with-column-name/m-p/777467#M247354</link>
      <description>Ok, but when I add new data to a historical file with proc append, it adds me as new lines and I wish it would add as a new column.  How do I change my code?</description>
      <pubDate>Sat, 30 Oct 2021 07:23:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-Report-Problem-with-column-name/m-p/777467#M247354</guid>
      <dc:creator>Gieorgie</dc:creator>
      <dc:date>2021-10-30T07:23:06Z</dc:date>
    </item>
    <item>
      <title>Re: PROC Report Problem with column name</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-Report-Problem-with-column-name/m-p/777469#M247356</link>
      <description>&lt;P&gt;You always keep your historical data in the vertical layout, append to it, and then create the report from that. Period.&lt;/P&gt;
&lt;P&gt;Maxim 19: Long Beats Wide.&lt;/P&gt;</description>
      <pubDate>Sat, 30 Oct 2021 07:43:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-Report-Problem-with-column-name/m-p/777469#M247356</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2021-10-30T07:43:47Z</dc:date>
    </item>
    <item>
      <title>Re: PROC Report Problem with column name</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-Report-Problem-with-column-name/m-p/777470#M247357</link>
      <description>Ok, I understand so I planned from the beginning and I wanted to do so.  However, is there any solution to adding a column next to the column rather than a row below the row for each proc append run</description>
      <pubDate>Sat, 30 Oct 2021 07:47:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-Report-Problem-with-column-name/m-p/777470#M247357</guid>
      <dc:creator>Gieorgie</dc:creator>
      <dc:date>2021-10-30T07:47:00Z</dc:date>
    </item>
    <item>
      <title>Re: PROC Report Problem with column name</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-Report-Problem-with-column-name/m-p/777471#M247358</link>
      <description>&lt;P&gt;&lt;FONT size="4"&gt;PROC REPORT and PROC TRANSPOSE do this automatically, but your working dataset &lt;STRONG&gt;MUST&lt;/STRONG&gt; be long.&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 30 Oct 2021 07:50:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-Report-Problem-with-column-name/m-p/777471#M247358</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2021-10-30T07:50:20Z</dc:date>
    </item>
    <item>
      <title>Re: PROC Report Problem with column name</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-Report-Problem-with-column-name/m-p/777474#M247360</link>
      <description>So after create tables go proc transpose data= (policy_vintage_weekly) out=long1;&lt;BR /&gt;   by Run_Date:&lt;BR /&gt;By Policy_vintage &lt;BR /&gt;run;   and after that append to historical file and next to create some reports?</description>
      <pubDate>Sat, 30 Oct 2021 08:13:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-Report-Problem-with-column-name/m-p/777474#M247360</guid>
      <dc:creator>Gieorgie</dc:creator>
      <dc:date>2021-10-30T08:13:34Z</dc:date>
    </item>
    <item>
      <title>Re: PROC Report Problem with column name</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-Report-Problem-with-column-name/m-p/777477#M247362</link>
      <description>&lt;P&gt;&lt;STRONG&gt;&lt;FONT size="6"&gt;NO!!!&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="4"&gt;You keep ALL datasets in the long layout, append that, and do any transposing (either with TRANSPOSE or REPORT) as a FINAL(!!!) step.&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 30 Oct 2021 09:37:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-Report-Problem-with-column-name/m-p/777477#M247362</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2021-10-30T09:37:17Z</dc:date>
    </item>
    <item>
      <title>Re: PROC Report Problem with column name</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-Report-Problem-with-column-name/m-p/777495#M247367</link>
      <description>Kurt sorry but I'm still confuse. My point is how to set proc append or proc transpose so that the wlong setting does not add data as consecutive rows or columns. There is a historical file that starts with Run_Date from 1, then if I run tomorrow with number 2. That number 2 should be the next column, not the next rows.</description>
      <pubDate>Sat, 30 Oct 2021 11:17:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-Report-Problem-with-column-name/m-p/777495#M247367</guid>
      <dc:creator>Gieorgie</dc:creator>
      <dc:date>2021-10-30T11:17:44Z</dc:date>
    </item>
    <item>
      <title>Re: PROC Report Problem with column name</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-Report-Problem-with-column-name/m-p/777496#M247368</link>
      <description>&lt;P&gt;I will say this a last time, in the hope that it finally sinks in:&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;ONE DOES NOT &lt;U&gt;WORK&lt;/U&gt; WITH WIDE DATASETS!!!&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Wide datasets are needed for regression (where you need a lot of predictors side-by-side with the outcome) or for presentation purposes. They are useless for work like joining, subsetting, grouping or appending (what you experience right now).&lt;/P&gt;
&lt;P&gt;So you keep all your data in a long layout, can then simply append (as the structure is constant) and let SAS procedures do the work of transposing for you when needed for reporting.&lt;/P&gt;</description>
      <pubDate>Sat, 30 Oct 2021 11:39:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-Report-Problem-with-column-name/m-p/777496#M247368</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2021-10-30T11:39:34Z</dc:date>
    </item>
    <item>
      <title>Re: PROC Report Problem with column name</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-Report-Problem-with-column-name/m-p/777497#M247369</link>
      <description>Ok now i get it, sorry i hope i didn't ruin your weekend &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;</description>
      <pubDate>Sat, 30 Oct 2021 11:43:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-Report-Problem-with-column-name/m-p/777497#M247369</guid>
      <dc:creator>Gieorgie</dc:creator>
      <dc:date>2021-10-30T11:43:06Z</dc:date>
    </item>
  </channel>
</rss>

