<?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: problem with nested columns in proc report in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/problem-with-nested-columns-in-proc-report/m-p/170988#M44172</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;According to your describing , &lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;BMI_low ,&amp;nbsp; &lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;BMI_high should be character type characer.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;compute BMI_low /&lt;STRONG&gt;character length=10&lt;/STRONG&gt;;&lt;BR /&gt;if BMI&amp;lt;30 then BMI_low=BMI;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;else BMI_low="-";&lt;BR /&gt;endcomp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;compute BMI_high/ &lt;STRONG style="background-color: #ffffff; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;character length=10&lt;/STRONG&gt;;&lt;BR /&gt;if BMI&amp;gt;=30 then BMI_high=BMI;&lt;BR /&gt;else BMI_high="-";&lt;BR /&gt;endcomp;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;run;&amp;nbsp; &lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;And the solution I recommend is making a PICTURE format and format BMI with it . As Cynthia pointed out , you need to post a sample data .&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;Xia Keshan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 17 Feb 2015 06:24:13 GMT</pubDate>
    <dc:creator>Ksharp</dc:creator>
    <dc:date>2015-02-17T06:24:13Z</dc:date>
    <item>
      <title>problem with nested columns in proc report</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/problem-with-nested-columns-in-proc-report/m-p/170986#M44170</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everybody,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to classify the value of BMI and report the value in two columns (BMI&amp;lt;30 and BMI&amp;gt;=30). Under BMI&amp;lt;30 column, values less than 30 should be reported and if the value is higher than 30 a "-" sign should be printed. But I can't get it done with the code below. Could someone kindly provide me some help?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&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 report&lt;/P&gt;&lt;P&gt;data = rawdata;&lt;BR /&gt;column id_no sequence gender ethnic_group age height weight BMI,(BMI_low BMI_high) BSA;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;&amp;nbsp;&amp;nbsp; define random_no&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /order order=internal left "Subject|No." format=z3.;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; define sequence&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /order order=internal left "Sequence" style=[cellwidth=1.41in];&lt;BR /&gt;&amp;nbsp;&amp;nbsp; define gender&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /center "Gender" style=[cellwidth=.5in];&lt;BR /&gt;&amp;nbsp;&amp;nbsp; define ethnic_group&amp;nbsp; /center width=11 "Ethnic Group" style=[cellwidth=.75in];&lt;BR /&gt;&amp;nbsp;&amp;nbsp; define age&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; /center width=11 "Age|(years)" style=[cellwidth=.5in];&lt;BR /&gt;&amp;nbsp;&amp;nbsp; define height&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /center width=11 "Height|(cm)" style=[cellwidth=.5in] format=comma5.1;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; define weight&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /center width=11 "Weight|(kg)" style=[cellwidth=.5in] format=comma5.1;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; define BMI&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; /across&amp;nbsp; "BMI|(kg/m2)" ;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; define BMI_low&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /computed "BMI&amp;lt;30" ;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; define BMI_high&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /computed "BMI&amp;gt;=30" ;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; define BSA&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /center width=11 "BSA|(m2)" format=comma4.1 style=[cellwidth=.5in] format=comma5.1;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;compute BMI_low;&lt;BR /&gt;if BMI&amp;lt;30 then BMI_low=BMI;&lt;/P&gt;&lt;P&gt; else BMI_low="-";&lt;BR /&gt;endcomp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;compute BMI_high;&lt;BR /&gt; if BMI&amp;gt;=30 then BMI_high=BMI;&lt;BR /&gt; else BMI_high="-";&lt;BR /&gt;endcomp;&lt;/P&gt;&lt;P&gt;run;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Feb 2015 15:45:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/problem-with-nested-columns-in-proc-report/m-p/170986#M44170</guid>
      <dc:creator>bmozdemir</dc:creator>
      <dc:date>2015-02-16T15:45:56Z</dc:date>
    </item>
    <item>
      <title>Re: problem with nested columns in proc report</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/problem-with-nested-columns-in-proc-report/m-p/170987#M44171</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi:&lt;/P&gt;&lt;P&gt;&amp;nbsp; Understanding the structure of your data will be essential in order for anyone to help with this request. You have specified data=rawdata in your code. Can you post a sample of your data file so that no one has to make up dummy data to aid you with this question. Otherwise, if you feel you cannot post data, then you might want to open a track with Tech Support for more confidential help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cynthia&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Feb 2015 00:25:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/problem-with-nested-columns-in-proc-report/m-p/170987#M44171</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2015-02-17T00:25:42Z</dc:date>
    </item>
    <item>
      <title>Re: problem with nested columns in proc report</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/problem-with-nested-columns-in-proc-report/m-p/170988#M44172</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;According to your describing , &lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;BMI_low ,&amp;nbsp; &lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;BMI_high should be character type characer.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;compute BMI_low /&lt;STRONG&gt;character length=10&lt;/STRONG&gt;;&lt;BR /&gt;if BMI&amp;lt;30 then BMI_low=BMI;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;else BMI_low="-";&lt;BR /&gt;endcomp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;compute BMI_high/ &lt;STRONG style="background-color: #ffffff; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;character length=10&lt;/STRONG&gt;;&lt;BR /&gt;if BMI&amp;gt;=30 then BMI_high=BMI;&lt;BR /&gt;else BMI_high="-";&lt;BR /&gt;endcomp;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;run;&amp;nbsp; &lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;And the solution I recommend is making a PICTURE format and format BMI with it . As Cynthia pointed out , you need to post a sample data .&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;Xia Keshan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Feb 2015 06:24:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/problem-with-nested-columns-in-proc-report/m-p/170988#M44172</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2015-02-17T06:24:13Z</dc:date>
    </item>
    <item>
      <title>Re: problem with nested columns in proc report</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/problem-with-nested-columns-in-proc-report/m-p/170989#M44173</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Cynthia and Xia. Thank you for your messages. I prepared a dummy data copied it below. I also tried Xia's suggestion but it didn't work. Waiting for your suggestions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Regards,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Murat&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data rawdata;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; infile datalines delimiter=','; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; input random_no sequence $ gender $ ethnic_group $ age height weight BMI BSA;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; datalines;&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;&lt;P&gt;1,R/T,Male,Caucasian,21,172.6,71.1,23.8,1.8&lt;/P&gt;&lt;P&gt;2,R/T,Male,Caucasian,23,177.8,72.1,22.7,1.9&lt;/P&gt;&lt;P&gt;3,R/T,Male,Caucasian,21,171.9,67.5,22.8,1.8&lt;/P&gt;&lt;P&gt;4,T/R,Male,Caucasian,19,173.9,74.2,24.5,1.9&lt;/P&gt;&lt;P&gt;5,R/T,Male,Caucasian,19,171.3,55.3,18.8,1.6&lt;/P&gt;&lt;P&gt;6,T/R,Male,Caucasian,23,180.1,84.6,26,2&lt;/P&gt;&lt;P&gt;7,T/R,Male,Caucasian,21,180.8,85.9,26.2,2.1&lt;/P&gt;&lt;P&gt;8,T/R,Male,Caucasian,23,177.9,94.9,29.9,2.1&lt;/P&gt;&lt;P&gt;9,R/T,Male,Caucasian,22,174.4,57.2,18.8,1.7&lt;/P&gt;&lt;P&gt;10,T/R,Male,Caucasian,22,174.3,55.5,18.2,1.7&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Feb 2015 08:38:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/problem-with-nested-columns-in-proc-report/m-p/170989#M44173</guid>
      <dc:creator>bmozdemir</dc:creator>
      <dc:date>2015-02-17T08:38:12Z</dc:date>
    </item>
    <item>
      <title>Re: problem with nested columns in proc report</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/problem-with-nested-columns-in-proc-report/m-p/170990#M44174</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't understand why you have BMI across usage ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data rawdata;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; infile datalines delimiter=',';&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; input random_no sequence $ gender $ ethnic_group $ age height weight BMI BSA;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; datalines;&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;&lt;P&gt;1,R/T,Male,Caucasian,21,172.6,71.1,23.8,1.8&lt;/P&gt;&lt;P&gt;2,R/T,Male,Caucasian,23,177.8,72.1,22.7,1.9&lt;/P&gt;&lt;P&gt;3,R/T,Male,Caucasian,21,171.9,67.5,22.8,1.8&lt;/P&gt;&lt;P&gt;4,T/R,Male,Caucasian,19,173.9,74.2,24.5,1.9&lt;/P&gt;&lt;P&gt;5,R/T,Male,Caucasian,19,171.3,55.3,38.8,1.6&lt;/P&gt;&lt;P&gt;6,T/R,Male,Caucasian,23,180.1,84.6,26,2&lt;/P&gt;&lt;P&gt;7,T/R,Male,Caucasian,21,180.8,85.9,36.2,2.1&lt;/P&gt;&lt;P&gt;8,T/R,Male,Caucasian,23,177.9,94.9,29.9,2.1&lt;/P&gt;&lt;P&gt;9,R/T,Male,Caucasian,22,174.4,57.2,38.8,1.7&lt;/P&gt;&lt;P&gt;10,T/R,Male,Caucasian,22,174.3,55.5,38.2,1.7&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;ods html file='x.html' style=sasweb;&lt;/P&gt;&lt;P&gt;proc report nowd&lt;/P&gt;&lt;P&gt;data = rawdata;&lt;/P&gt;&lt;P&gt;column id_no sequence gender ethnic_group age height weight BMI ('BMI|(kg/m2)' BMI_low BMI_high) BSA;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; define random_no&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /order order=internal left "Subject|No." format=z3.;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; define sequence&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /order order=internal left "Sequence" style=[cellwidth=1.41in];&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; define gender&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /center "Gender" style=[cellwidth=.5in];&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; define ethnic_group&amp;nbsp; /center width=11 "Ethnic Group" style=[cellwidth=.75in];&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; define age&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; /center width=11 "Age|(years)" style=[cellwidth=.5in];&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; define height&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /center width=11 "Height|(cm)" style=[cellwidth=.5in] format=comma5.1;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; define weight&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /center width=11 "Weight|(kg)" style=[cellwidth=.5in] format=comma5.1;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; define BMI&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; /display noprint "BMI|(kg/m2)" ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; define BMI_low&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /computed "BMI&amp;lt;30" ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; define BMI_high&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /computed "BMI&amp;gt;=30" ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; define BSA&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /center width=11 "BSA|(m2)" format=comma4.1 style=[cellwidth=.5in] format=comma5.1;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;compute BMI_low/character length=10;&lt;/P&gt;&lt;P&gt;if BMI&amp;lt;30 then BMI_low=BMI;&lt;/P&gt;&lt;P&gt;else BMI_low="-";&lt;/P&gt;&lt;P&gt;endcomp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;compute BMI_high/character length=10;&lt;/P&gt;&lt;P&gt;if BMI&amp;gt;=30 then BMI_high=BMI;&lt;/P&gt;&lt;P&gt;else BMI_high="-";&lt;/P&gt;&lt;P&gt;endcomp;&lt;/P&gt;&lt;P&gt;run;&amp;nbsp; &lt;/P&gt;&lt;P&gt;ods html close;&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;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Xia Keshan&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: xia keshan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Feb 2015 13:24:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/problem-with-nested-columns-in-proc-report/m-p/170990#M44174</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2015-02-17T13:24:06Z</dc:date>
    </item>
    <item>
      <title>Re: problem with nested columns in proc report</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/problem-with-nested-columns-in-proc-report/m-p/170991#M44175</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi:&lt;/P&gt;&lt;P&gt;Thanks for posting your data. I did not see before that you were using BMI as an ACROSS usage variable. That does not make sense. using BMI as an ACROSS item will cause every unique value of BMI to get it's own column. I do not think this is what you want. Also, all your BMIs are under 30, so there is nothing to test your over 30 condition. I think you can do what you want without using ACROSS and just using BMI 2 times on the report, by creating a user-defined format for the low vs the high.&lt;/P&gt;&lt;P&gt;cynthia&lt;/P&gt;&lt;BR /&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/10605i78778F1CCF479543/image-size/large?v=1.0&amp;amp;px=600" border="0" alt="each_BMI_sep_ACROSS_incorrect.png" title="each_BMI_sep_ACROSS_incorrect.png" /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Feb 2015 13:40:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/problem-with-nested-columns-in-proc-report/m-p/170991#M44175</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2015-02-17T13:40:00Z</dc:date>
    </item>
    <item>
      <title>Re: problem with nested columns in proc report</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/problem-with-nested-columns-in-proc-report/m-p/170992#M44176</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi again,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I posted an image showing what I need. Hope this will clarify the issue. I have a huge dataset and in this data there are BMI values below and above 30. What I need is if the value is &amp;gt;=30 then it should be written under the right column and the other column should be "-" or "NA" or similar...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Murat&lt;/P&gt;&lt;P&gt;&lt;IMG alt="BMI.png" class="jive-image-thumbnail jive-image" src="https://communities.sas.com/legacyfs/online/9208_BMI.png" width="450" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Feb 2015 15:17:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/problem-with-nested-columns-in-proc-report/m-p/170992#M44176</guid>
      <dc:creator>bmozdemir</dc:creator>
      <dc:date>2015-02-17T15:17:12Z</dc:date>
    </item>
    <item>
      <title>Re: problem with nested columns in proc report</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/problem-with-nested-columns-in-proc-report/m-p/170993#M44177</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi:&lt;/P&gt;&lt;P&gt;&amp;nbsp; As I indicated, I think this is easy to do using formats, but without using ACROSS. You will want to read about using aliases with PROC REPORT so you can use a column more than 1 time. Please see the example below. You did not say what destination you wanted, so I just used ODS HTML. There is also an alternate program you could use -- still need aliases, but instead of a format, you will use a COMPUTE block. Still no ACROSS needed.&lt;/P&gt;&lt;P&gt;cynthia&lt;/P&gt;&lt;BR /&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/11750i150EA7B23DDC54BC/image-size/large?v=1.0&amp;amp;px=600" border="0" alt="BMI_example_use_aliases_with_format.png" title="BMI_example_use_aliases_with_format.png" /&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/11751iBC0CB6F4CFBD5181/image-size/large?v=1.0&amp;amp;px=600" border="0" alt="alternate_no_format.png" title="alternate_no_format.png" /&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/11752iE8C5B68DEEAE1B8D/image-size/large?v=1.0&amp;amp;px=600" border="0" alt="BMI_with_format.png" title="BMI_with_format.png" /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Feb 2015 20:14:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/problem-with-nested-columns-in-proc-report/m-p/170993#M44177</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2015-02-17T20:14:40Z</dc:date>
    </item>
    <item>
      <title>Re: problem with nested columns in proc report</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/problem-with-nested-columns-in-proc-report/m-p/170994#M44178</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is a wonderful solution Cynthia. Thank you so much!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Feb 2015 20:36:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/problem-with-nested-columns-in-proc-report/m-p/170994#M44178</guid>
      <dc:creator>bmozdemir</dc:creator>
      <dc:date>2015-02-17T20:36:18Z</dc:date>
    </item>
  </channel>
</rss>

