<?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: Grouping data in pie chart in SAS Studio</title>
    <link>https://communities.sas.com/t5/SAS-Studio/Grouping-data-in-pie-chart/m-p/620376#M8707</link>
    <description>You didn't actually apply the format to the SASStudio.Pie data set or at least not shown. Make sure to apply it to that data set.&lt;BR /&gt;&lt;BR /&gt;One way, I don't recommend is as follows:&lt;BR /&gt;&lt;BR /&gt;data sasstudio.pie;&lt;BR /&gt;set sasstudio.pie;&lt;BR /&gt;format screening_age ageGrp.;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;*now have proc template and SGRENDER code;</description>
    <pubDate>Mon, 27 Jan 2020 22:27:30 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2020-01-27T22:27:30Z</dc:date>
    <item>
      <title>Grouping data in pie chart</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Grouping-data-in-pie-chart/m-p/620233#M8697</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to create a pie chart with the ages of a group of study participants, but am struggling to divide the data points into specific categories within the chart. I would like to divide the group into ages &amp;lt;30, 30-59, and &amp;gt;59, but can't seem to group the data points into these 3 categories when I produce the pie chart. Is there a way to specify these groups in the proc template code, or do I need to create groups in the data set before trying to make the chart?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thank you!&lt;/P&gt;</description>
      <pubDate>Mon, 27 Jan 2020 17:04:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Grouping-data-in-pie-chart/m-p/620233#M8697</guid>
      <dc:creator>sms39</dc:creator>
      <dc:date>2020-01-27T17:04:23Z</dc:date>
    </item>
    <item>
      <title>Re: Grouping data in pie chart</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Grouping-data-in-pie-chart/m-p/620234#M8698</link>
      <description>&lt;P&gt;Use a FORMAT in the code. If the data is grouped by the format it should work but it may also depend on which PROC you're using, which you haven't specified.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/305943"&gt;@sms39&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hi all,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am trying to create a pie chart with the ages of a group of study participants, but am struggling to divide the data points into specific categories within the chart. I would like to divide the group into ages &amp;lt;30, 30-59, and &amp;gt;59, but can't seem to group the data points into these 3 categories when I produce the pie chart. Is there a way to specify these groups in the proc template code, or do I need to create groups in the data set before trying to make the chart?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;thank you!&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 27 Jan 2020 17:09:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Grouping-data-in-pie-chart/m-p/620234#M8698</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2020-01-27T17:09:10Z</dc:date>
    </item>
    <item>
      <title>Re: Grouping data in pie chart</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Grouping-data-in-pie-chart/m-p/620373#M8706</link>
      <description>&lt;P&gt;I've been able to sub-categorize the ages, but can't seem to get the pie chart to utilize the new groupings. I assume there is something I need to specify along the bolded line of code, but I can't seem to get it right. Any suggestions would be appreciated&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;/* new age groups*/&lt;BR /&gt;proc format;&lt;BR /&gt;value AgeGrp 1-30 ='&amp;lt;30'&lt;BR /&gt;value AgeGrp 30-59 = '30-59'&lt;BR /&gt;value AgeGrp 60-100 = '&amp;gt;60';&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;proc freq data=DataSet;&lt;BR /&gt;format Screening_AGE AgeGrp.;&lt;BR /&gt;Table Screening_AGE;&lt;BR /&gt;Run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;/* Define Pie template */&lt;BR /&gt;proc template;&lt;BR /&gt;define statgraph SASStudio.Pie;&lt;BR /&gt;begingraph;&lt;BR /&gt;layout region;&lt;BR /&gt;&lt;STRONG&gt;piechart category= Screening_AGE /;&lt;/STRONG&gt;&lt;BR /&gt;endlayout;&lt;BR /&gt;endgraph;&lt;BR /&gt;end;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ods graphics / reset width=6.4in height=4.8in imagemap;&lt;/P&gt;&lt;P&gt;proc sgrender template=SASStudio.Pie data=DataSet;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;ods graphics / reset;&lt;/P&gt;</description>
      <pubDate>Mon, 27 Jan 2020 22:22:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Grouping-data-in-pie-chart/m-p/620373#M8706</guid>
      <dc:creator>sms39</dc:creator>
      <dc:date>2020-01-27T22:22:09Z</dc:date>
    </item>
    <item>
      <title>Re: Grouping data in pie chart</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Grouping-data-in-pie-chart/m-p/620376#M8707</link>
      <description>You didn't actually apply the format to the SASStudio.Pie data set or at least not shown. Make sure to apply it to that data set.&lt;BR /&gt;&lt;BR /&gt;One way, I don't recommend is as follows:&lt;BR /&gt;&lt;BR /&gt;data sasstudio.pie;&lt;BR /&gt;set sasstudio.pie;&lt;BR /&gt;format screening_age ageGrp.;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;*now have proc template and SGRENDER code;</description>
      <pubDate>Mon, 27 Jan 2020 22:27:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Grouping-data-in-pie-chart/m-p/620376#M8707</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2020-01-27T22:27:30Z</dc:date>
    </item>
    <item>
      <title>Re: Grouping data in pie chart</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Grouping-data-in-pie-chart/m-p/620385#M8708</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc sgrender template=SASStudio.Pie data=DataSet;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;format Screening_age age_grp. ;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;if the format isn't permanently associated with the variable.&lt;/P&gt;</description>
      <pubDate>Mon, 27 Jan 2020 22:48:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Grouping-data-in-pie-chart/m-p/620385#M8708</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2020-01-27T22:48:34Z</dc:date>
    </item>
    <item>
      <title>Re: Grouping data in pie chart</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Grouping-data-in-pie-chart/m-p/620409#M8709</link>
      <description>Brilliant! Thank you so much!</description>
      <pubDate>Tue, 28 Jan 2020 00:45:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Grouping-data-in-pie-chart/m-p/620409#M8709</guid>
      <dc:creator>sms39</dc:creator>
      <dc:date>2020-01-28T00:45:25Z</dc:date>
    </item>
  </channel>
</rss>

