<?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 change from baseline table in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Proc-report-change-from-baseline-table/m-p/764113#M241998</link>
    <description>I can't see what you want as I won't download an MS Office file, but the description seems like a good fit for proc tabulate. Why not use it?</description>
    <pubDate>Thu, 26 Aug 2021 05:47:29 GMT</pubDate>
    <dc:creator>ChrisNZ</dc:creator>
    <dc:date>2021-08-26T05:47:29Z</dc:date>
    <item>
      <title>Proc report change from baseline table</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-report-change-from-baseline-table/m-p/764105#M241995</link>
      <description>&lt;P&gt;Hi every one,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to create a&amp;nbsp;change from baseline table from a sample data attached below&lt;/P&gt;&lt;P&gt;I have already create a CHANGE variable that is the difference of after (ANRIND) and baseline (BNRIND).&lt;/P&gt;&lt;P&gt;My code is that:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc report data=Test nowd completerows completecols split="$" 
		style(report)=[outputwidth=100%];
		Label PARAM="Laboratory Parameter";
	
	by PARAM;
	column PARAM AVISIT ("Timepoint" TRTA)  ("Actual Value~R/RTF'\brdrb\brdrs\li100\ni100'" BNRIND) ("Change From Baseline~R/RTF'\brdrb\brdrs\li100\ni100'"Change);
	define PARAM--AVISIT /group noprint;
	define Change/across " ";
	define TRTA / group mlf  order=data 
		style=[width=7.8% pretext="  " asis=on] " ";
	define BNRIND/ANALYSIS sum  n mean std median min max across " ";
	compute before AVISIT;
		line @1 " ";
		line @1 AVISIT $;
		endcomp;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;But the result I got is not what I want:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="James_Yu_0-1629952302091.png" style="width: 854px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/63041iBD7A4263CB2F6C03/image-dimensions/854x155?v=v2" width="854" height="155" role="button" title="James_Yu_0-1629952302091.png" alt="James_Yu_0-1629952302091.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I want to display n, mean, sd,... of BNRIND and CHANGE with each treatment group in each time point so I try to add these options in&amp;nbsp;&lt;CODE class=" language-sas"&gt;define&lt;/CODE&gt; &amp;nbsp;statement but I only got something about actual value&lt;/P&gt;&lt;P&gt;How can I&amp;nbsp;display these statistics ?&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;</description>
      <pubDate>Thu, 26 Aug 2021 04:36:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-report-change-from-baseline-table/m-p/764105#M241995</guid>
      <dc:creator>James_Yu</dc:creator>
      <dc:date>2021-08-26T04:36:45Z</dc:date>
    </item>
    <item>
      <title>Re: Proc report change from baseline table</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-report-change-from-baseline-table/m-p/764113#M241998</link>
      <description>I can't see what you want as I won't download an MS Office file, but the description seems like a good fit for proc tabulate. Why not use it?</description>
      <pubDate>Thu, 26 Aug 2021 05:47:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-report-change-from-baseline-table/m-p/764113#M241998</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2021-08-26T05:47:29Z</dc:date>
    </item>
    <item>
      <title>Re: Proc report change from baseline table</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-report-change-from-baseline-table/m-p/764219#M242036</link>
      <description>&lt;P&gt;Hint: showing results that you do not want isn't greatly helpful. Showing results that you do actually want, if we have the data in the form of a data step, is much more likely to get a working solution.&lt;/P&gt;</description>
      <pubDate>Thu, 26 Aug 2021 14:34:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-report-change-from-baseline-table/m-p/764219#M242036</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2021-08-26T14:34:27Z</dc:date>
    </item>
    <item>
      <title>Re: Proc report change from baseline table</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-report-change-from-baseline-table/m-p/764312#M242079</link>
      <description>&lt;P&gt;Hi:&lt;BR /&gt;A few other comments to add onto the previous requests for actual data and your entire program. I see that you are using the MLF option. Typically, this is used with PRELOADFMT and a custom user-defined format. I do not see any formats being used in your code, so if your data does have a user-defined format assigned permanently, we need to see/know about that format. Also, it's not clear why you are using RTF control strings in your spanning headers, but showing what appears to be ODS HTML output. When you post code, we need to see ALL your statements, including your options, formats and ODS statements, so any program can be run using the SAME options.&lt;BR /&gt;Then, are you sure that your program is actually generating the results you posted? I find this very confusing and PROC REPORT will, in the end, use ACROSS and not ANALYSIS for your BNRIND variable.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Cynthia_sas_0-1630006170406.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/63069i977D42128EE43C1F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Cynthia_sas_0-1630006170406.png" alt="Cynthia_sas_0-1630006170406.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; If you have ANALYSIS as a usage, you should only specify 1 statistic in a DEFINE statement. If you have more than 1 statistic the last statistic is used. If you have what you show (with both ANALYSIS and ACROSS, since ACROSS is listed last, that is what will be used.&lt;BR /&gt;Based on the fact that the program has these issues, it really is best to show some sample data in the form of a DATA step that others can run.&lt;BR /&gt;Cynthia&lt;/P&gt;</description>
      <pubDate>Thu, 26 Aug 2021 19:29:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-report-change-from-baseline-table/m-p/764312#M242079</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2021-08-26T19:29:39Z</dc:date>
    </item>
    <item>
      <title>Re: Proc report change from baseline table</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-report-change-from-baseline-table/m-p/764390#M242121</link>
      <description>&lt;P&gt;So I just found out the code of report step below works fine for me with the test data&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc report data=Test nowd completerows completecols split="$" 
		style(report)=[outputwidth=100%];
		Label PARAM="Laboratory Parameter";
	
	by PARAM;
	column PARAM AVISIT ("Timepoint" TRTA) BNRIND,(N Mean STD Median Min Max) Change,(N Mean STD Median Min Max);
	define PARAM--AVISIT /group noprint;
	define TRTA/group order=data 
		style=[width=7.8% pretext="  " asis=on] " ";
	
	define Change/Analysis "Change from baseline";
	Define BNRIND/Analysis "Actual Value";
	compute before AVISIT;
		line @1 " ";
		line @1 AVISIT $;
		endcomp;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;But when I use my real data, I need to do some data step (merge) to create the form of&amp;nbsp;test data. And then, the step could not print out the Max statistic with Change variable&lt;/P&gt;&lt;P&gt;My data step is like that:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data work.database1;
set work.database (rename=  (Result = BNRIND));
where  VISITNUM =1;
drop  VISITNUM;
run;

data work.database2;
set work.database (rename=  (Result = ANRIND));
drop  Sex;
run;

DATA ork.database3;
merge work.database1 work.database2;
by UNISUBID PARAM;
length VISIT $20;
IF VISITNUM=1 then VISIT="Baseline";
IF VISITNUM=2 then VISIT="Week 4";
IF VISITNUM=3 then VISIT="Week 8";
RUN;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;The result I want to get is like that&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="James_Yu_0-1630041114105.png" style="width: 534px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/63077i6EFDF2D963873E66/image-dimensions/534x150?v=v2" width="534" height="150" role="button" title="James_Yu_0-1630041114105.png" alt="James_Yu_0-1630041114105.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;But I only get like that&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="James_Yu_1-1630041221488.png" style="width: 542px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/63078i6CB9810D5E007FE0/image-dimensions/542x128?v=v2" width="542" height="128" role="button" title="James_Yu_1-1630041221488.png" alt="James_Yu_1-1630041221488.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Could I have nay idea to fix this situation ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 27 Aug 2021 05:14:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-report-change-from-baseline-table/m-p/764390#M242121</guid>
      <dc:creator>James_Yu</dc:creator>
      <dc:date>2021-08-27T05:14:52Z</dc:date>
    </item>
  </channel>
</rss>

