<?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 Calculating frequency percentage by category in Visual Analytics 8.5 in SAS Visual Analytics</title>
    <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Calculating-frequency-percentage-by-category-in-Visual-Analytics/m-p/698034#M14424</link>
    <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am brand new to SAS Visual Analytics, so forgive me if there is an obvious answer to this question that I have missed (but I have searched this forum and have not found an answer). I am creating a stacked bar chart displaying the race/ethnicity (group) of a population over a 5 year period (category includes five values: 2015, 2016, 2017, 2018, 2019). I am displaying the frequency as my measure, but I would like the end user to be able to also see the frequency percent as a data tip. However, when I select frequency percent as a data tip value, the percentage is being calculated using the entire dataset's number of observations (all five years) as the denominator. What I want is to display the frequency percent using each distinct category's observations (i.e., each year's observations) as the denominator.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Someone posted a similar question to this forum and the response was to select "Normalize groups to 100%" in the options. While this does show the correct frequency percent (by year), it's not an ideal solution, because I lose the ability to visualize the magnitude of raw growth over time. I am attaching a screenshot of the problem below. For example, I want the frequency percent in the data tip to calculate the percentage of the Asian population in the Fall 2017 term as 596/6,688=8.9%, but the frequency percent is currently using the entire number of observations in the dataset (6,502+6,541+6,688+6,874+7,177) as the denominator.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screen Shot 2020-11-10 at 4.42.51 PM.png" style="width: 656px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/51563iE8E4E4767766C46D/image-dimensions/656x405?v=v2" width="656" height="405" role="button" title="Screen Shot 2020-11-10 at 4.42.51 PM.png" alt="Screen Shot 2020-11-10 at 4.42.51 PM.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Appreciate any help!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;John&lt;/P&gt;</description>
    <pubDate>Tue, 10 Nov 2020 22:01:57 GMT</pubDate>
    <dc:creator>JohnDooris</dc:creator>
    <dc:date>2020-11-10T22:01:57Z</dc:date>
    <item>
      <title>Calculating frequency percentage by category in Visual Analytics 8.5</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Calculating-frequency-percentage-by-category-in-Visual-Analytics/m-p/698034#M14424</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am brand new to SAS Visual Analytics, so forgive me if there is an obvious answer to this question that I have missed (but I have searched this forum and have not found an answer). I am creating a stacked bar chart displaying the race/ethnicity (group) of a population over a 5 year period (category includes five values: 2015, 2016, 2017, 2018, 2019). I am displaying the frequency as my measure, but I would like the end user to be able to also see the frequency percent as a data tip. However, when I select frequency percent as a data tip value, the percentage is being calculated using the entire dataset's number of observations (all five years) as the denominator. What I want is to display the frequency percent using each distinct category's observations (i.e., each year's observations) as the denominator.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Someone posted a similar question to this forum and the response was to select "Normalize groups to 100%" in the options. While this does show the correct frequency percent (by year), it's not an ideal solution, because I lose the ability to visualize the magnitude of raw growth over time. I am attaching a screenshot of the problem below. For example, I want the frequency percent in the data tip to calculate the percentage of the Asian population in the Fall 2017 term as 596/6,688=8.9%, but the frequency percent is currently using the entire number of observations in the dataset (6,502+6,541+6,688+6,874+7,177) as the denominator.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screen Shot 2020-11-10 at 4.42.51 PM.png" style="width: 656px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/51563iE8E4E4767766C46D/image-dimensions/656x405?v=v2" width="656" height="405" role="button" title="Screen Shot 2020-11-10 at 4.42.51 PM.png" alt="Screen Shot 2020-11-10 at 4.42.51 PM.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Appreciate any help!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;John&lt;/P&gt;</description>
      <pubDate>Tue, 10 Nov 2020 22:01:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/Calculating-frequency-percentage-by-category-in-Visual-Analytics/m-p/698034#M14424</guid>
      <dc:creator>JohnDooris</dc:creator>
      <dc:date>2020-11-10T22:01:57Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating frequency percentage by category in Visual Analytics 8.5</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Calculating-frequency-percentage-by-category-in-Visual-Analytics/m-p/698346#M14426</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/356492"&gt;@JohnDooris&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Welcome to our community!&amp;nbsp;Yes, this is easily doable with the &lt;STRONG&gt;AggregateTable&lt;/STRONG&gt; operator which you use to fix the aggregation to Term level.&lt;/P&gt;
&lt;P&gt;For more information about &lt;STRONG&gt;AggregateTable&lt;/STRONG&gt;:&amp;nbsp;&lt;A href="https://communities.sas.com/t5/SAS-Communities-Library/SAS-Visual-Analytics-Advanced-Calculations-part-2-of-4/ta-p/538541" target="_blank" rel="noopener"&gt;https://communities.sas.com/t5/SAS-Communities-Library/SAS-Visual-Analytics-Advanced-Calculations-part-2-of-4/ta-p/538541&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here's the &lt;EM&gt;New Calculated Item&lt;/EM&gt; view:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.PNG" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/51599i7060BC0D36EB84C4/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.PNG" alt="Capture.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here's the code:&lt;/P&gt;
&lt;PRE&gt;Sum [_ByGroup_] ('Population'n) / AggregateTable(_Sum_, Table(
_Sum_, Fixed('Term'n), 'Population'n))&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;And here's how it looks:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture2.PNG" style="width: 959px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/51601i4985BCDC40F5F549/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture2.PNG" alt="Capture2.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I hope this helps &lt;span class="lia-unicode-emoji" title=":grinning_face_with_big_eyes:"&gt;😃&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best regards,&lt;/P&gt;
&lt;P&gt;Petri&lt;/P&gt;</description>
      <pubDate>Fri, 13 Nov 2020 05:25:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/Calculating-frequency-percentage-by-category-in-Visual-Analytics/m-p/698346#M14426</guid>
      <dc:creator>PetriRoine</dc:creator>
      <dc:date>2020-11-13T05:25:12Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating frequency percentage by category in Visual Analytics 8.5</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Calculating-frequency-percentage-by-category-in-Visual-Analytics/m-p/698410#M14430</link>
      <description>&lt;P&gt;Thank you &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/106261"&gt;@PetriRoine&lt;/a&gt; !&lt;/P&gt;</description>
      <pubDate>Thu, 12 Nov 2020 15:44:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/Calculating-frequency-percentage-by-category-in-Visual-Analytics/m-p/698410#M14430</guid>
      <dc:creator>JohnDooris</dc:creator>
      <dc:date>2020-11-12T15:44:28Z</dc:date>
    </item>
  </channel>
</rss>

