<?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 how can i sort the computed Total_count  variable as  descending order in  proc report in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/how-can-i-sort-the-computed-Total-count-variable-as-descending/m-p/455843#M115384</link>
    <description>&lt;P&gt;PROC REPORT DATA=expo.OPEN_TICKET_SUMMARY_SOURCE1 out=expo.summary_table_result LIST&lt;BR /&gt;/*style=[cellwidth=.1 in rules=group frame=void] */&lt;BR /&gt;style(header)=[background= #BBDEFB foreground=black]&lt;BR /&gt;style(summary)=[background=white foreground=black font_weight=bold];&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;COLUMN UserName (category,status) Total_count ;&lt;BR /&gt;DEFINE UserName / GROUP style=[background=#BBDEFB foreground=black font_weight=bold borderleftwidth=2 borderrightwidth=2] ;&lt;BR /&gt;DEFINE CATEGORY / ACROSS style =[borderleftwidth=1 borderrightwidth=1];&lt;BR /&gt;DEFINE STATUS / ACROSS style =[borderleftwidth=1 borderrightwidth=1 ];&lt;BR /&gt;&lt;STRONG&gt;define total_count / computed style=[font_weight=bold foreground=black ] ;&lt;/STRONG&gt;&lt;BR /&gt;rbreak after / summarize;&lt;BR /&gt;&lt;STRONG&gt;compute total_count;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;Total_count=sum(input(_c2_,best32.),&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;input(_c3_,best32.),&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;input(_c4_,best32.),&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;input(_c5_,best32.),&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;input(_c6_,best32.),&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;input(_c7_,best32.),&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;input(_c8_,best32.),&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;input(_c9_,best32.),&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;input(_c10_,best32.)&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;IF total_count ^= ''&lt;BR /&gt;THEN CALL DEFINE(_COL_, "style", "STYLE=[BACKGROUND=white ]");&lt;BR /&gt;endcomp;&lt;/P&gt;&lt;P&gt;RUN;&lt;/P&gt;</description>
    <pubDate>Fri, 20 Apr 2018 07:58:34 GMT</pubDate>
    <dc:creator>anil2</dc:creator>
    <dc:date>2018-04-20T07:58:34Z</dc:date>
    <item>
      <title>how can i sort the computed Total_count  variable as  descending order in  proc report</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-can-i-sort-the-computed-Total-count-variable-as-descending/m-p/455843#M115384</link>
      <description>&lt;P&gt;PROC REPORT DATA=expo.OPEN_TICKET_SUMMARY_SOURCE1 out=expo.summary_table_result LIST&lt;BR /&gt;/*style=[cellwidth=.1 in rules=group frame=void] */&lt;BR /&gt;style(header)=[background= #BBDEFB foreground=black]&lt;BR /&gt;style(summary)=[background=white foreground=black font_weight=bold];&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;COLUMN UserName (category,status) Total_count ;&lt;BR /&gt;DEFINE UserName / GROUP style=[background=#BBDEFB foreground=black font_weight=bold borderleftwidth=2 borderrightwidth=2] ;&lt;BR /&gt;DEFINE CATEGORY / ACROSS style =[borderleftwidth=1 borderrightwidth=1];&lt;BR /&gt;DEFINE STATUS / ACROSS style =[borderleftwidth=1 borderrightwidth=1 ];&lt;BR /&gt;&lt;STRONG&gt;define total_count / computed style=[font_weight=bold foreground=black ] ;&lt;/STRONG&gt;&lt;BR /&gt;rbreak after / summarize;&lt;BR /&gt;&lt;STRONG&gt;compute total_count;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;Total_count=sum(input(_c2_,best32.),&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;input(_c3_,best32.),&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;input(_c4_,best32.),&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;input(_c5_,best32.),&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;input(_c6_,best32.),&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;input(_c7_,best32.),&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;input(_c8_,best32.),&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;input(_c9_,best32.),&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;input(_c10_,best32.)&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;IF total_count ^= ''&lt;BR /&gt;THEN CALL DEFINE(_COL_, "style", "STYLE=[BACKGROUND=white ]");&lt;BR /&gt;endcomp;&lt;/P&gt;&lt;P&gt;RUN;&lt;/P&gt;</description>
      <pubDate>Fri, 20 Apr 2018 07:58:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-can-i-sort-the-computed-Total-count-variable-as-descending/m-p/455843#M115384</guid>
      <dc:creator>anil2</dc:creator>
      <dc:date>2018-04-20T07:58:34Z</dc:date>
    </item>
    <item>
      <title>Re: how can i sort the computed Total_count  variable as  descending order in  proc report</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-can-i-sort-the-computed-Total-count-variable-as-descending/m-p/455849#M115386</link>
      <description>&lt;P&gt;Why not summarise your data in a a datastep before the proce report using a procedure designed for such a task - means/summary - then use a simple proc report to print the data out.&amp;nbsp; You have full control over the data then.&lt;/P&gt;</description>
      <pubDate>Fri, 20 Apr 2018 08:20:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-can-i-sort-the-computed-Total-count-variable-as-descending/m-p/455849#M115386</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2018-04-20T08:20:56Z</dc:date>
    </item>
    <item>
      <title>Re: how can i sort the computed Total_count  variable as  descending order in  proc report</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-can-i-sort-the-computed-Total-count-variable-as-descending/m-p/455932#M115417</link>
      <description>&lt;P&gt;As I understand proc report you can only modify the order of appearance of variables that are Group, Order or Across, not computed.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So to get the desired order I think you'll want to go with &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/45151"&gt;@RW9&lt;/a&gt;'s suggestion of summarizing the data prior to building the report.&lt;/P&gt;</description>
      <pubDate>Fri, 20 Apr 2018 14:34:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-can-i-sort-the-computed-Total-count-variable-as-descending/m-p/455932#M115417</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-04-20T14:34:31Z</dc:date>
    </item>
    <item>
      <title>Re: how can i sort the computed Total_count  variable as  descending order in  proc report</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-can-i-sort-the-computed-Total-count-variable-as-descending/m-p/469286#M120011</link>
      <description>Thanks,&lt;BR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13884"&gt;@ballardw&lt;/a&gt; i have solved above issue by using datafmt option</description>
      <pubDate>Mon, 11 Jun 2018 15:28:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-can-i-sort-the-computed-Total-count-variable-as-descending/m-p/469286#M120011</guid>
      <dc:creator>anil2</dc:creator>
      <dc:date>2018-06-11T15:28:25Z</dc:date>
    </item>
  </channel>
</rss>

