<?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: Percentages for &amp;quot;Select all&amp;quot; Survey Questions in SAS Visual Analytics</title>
    <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Percentages-for-quot-Select-all-quot-Survey-Questions/m-p/699829#M14447</link>
    <description>&lt;P&gt;Thank you for the suggestion! John and I are with the same organization, and so we've discussed this solution. It works for his scenario, but mine is slightly different in that I'm not using a simple frequency.&amp;nbsp; Instead, I'm looking to calculate the percentage based off of a distinct count of ID numbers in the chart, rather than just a sum of cases. So in this 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;My "population" would be a distinct count of ID numbers. However, using a distinct count will not work within the given formula. Any thoughts on how to get around this?&lt;/P&gt;</description>
    <pubDate>Wed, 18 Nov 2020 15:31:14 GMT</pubDate>
    <dc:creator>EEARL</dc:creator>
    <dc:date>2020-11-18T15:31:14Z</dc:date>
    <item>
      <title>Percentages for "Select all" Survey Questions</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Percentages-for-quot-Select-all-quot-Survey-Questions/m-p/699475#M14442</link>
      <description>&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;Hi all,&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;I’m new to SAS Visual Analytics, so please forgive me if I’ve missed the obvious answer to this, but a search hasn’t yielded anything for me.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;We are trying to dashboard the results of a survey using various filters. Most questions visualize correctly, and the data matches the numbers we’ve generated using our flat files. However, we are running into an issue for items where respondents were able to select more than one response option (i.e., “select all that apply” questions). SAS Viya is correctly counting the number of unique responses for each option, but it is incorrectly calculating the percentages those counts represent. What seems to be happening is that Viya is taking each row from the table and adding them together to produce a denominator used in the percentage calculation. However, we need the denominator to use the distinct count of individuals within the whole table, not just within each row. Here’s an example: we have 4430 undergraduate students that took the survey, so the denominator for each row in this chart should be 4430. However, because some respondents selected multiple options, the percentages are being calculated using a denominator of 5230 – the sum of headcounts for each of the rows/bars. Therefore, the 1001 students that selected “academic performance” are being calculated as 1001/5230 (19%) when actually, 23% (1001/4430) of students selected that item.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;Any thoughts on how to display percentages based on distinct counts when the categories are not mutually exclusive?&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;Thanks for any help!&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;-Elijah&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 17 Nov 2020 13:14:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/Percentages-for-quot-Select-all-quot-Survey-Questions/m-p/699475#M14442</guid>
      <dc:creator>EEARL</dc:creator>
      <dc:date>2020-11-17T13:14:59Z</dc:date>
    </item>
    <item>
      <title>Re: Percentages for "Select all" Survey Questions</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Percentages-for-quot-Select-all-quot-Survey-Questions/m-p/699676#M14446</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/357325"&gt;@EEARL&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please have a look at this post as it might be a similar type of issue.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://communities.sas.com/t5/SAS-Visual-Analytics/Calculating-frequency-percentage-by-category-in-Visual-Analytics/m-p/698034#M14424" target="_blank" rel="noopener"&gt;https://communities.sas.com/t5/SAS-Visual-Analytics/Calculating-frequency-percentage-by-category-in-Visual-Analytics/m-p/698034#M14424&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best regards,&lt;BR /&gt;Petri&lt;/P&gt;</description>
      <pubDate>Wed, 18 Nov 2020 06:14:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/Percentages-for-quot-Select-all-quot-Survey-Questions/m-p/699676#M14446</guid>
      <dc:creator>PetriRoine</dc:creator>
      <dc:date>2020-11-18T06:14:11Z</dc:date>
    </item>
    <item>
      <title>Re: Percentages for "Select all" Survey Questions</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Percentages-for-quot-Select-all-quot-Survey-Questions/m-p/699829#M14447</link>
      <description>&lt;P&gt;Thank you for the suggestion! John and I are with the same organization, and so we've discussed this solution. It works for his scenario, but mine is slightly different in that I'm not using a simple frequency.&amp;nbsp; Instead, I'm looking to calculate the percentage based off of a distinct count of ID numbers in the chart, rather than just a sum of cases. So in this 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;My "population" would be a distinct count of ID numbers. However, using a distinct count will not work within the given formula. Any thoughts on how to get around this?&lt;/P&gt;</description>
      <pubDate>Wed, 18 Nov 2020 15:31:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/Percentages-for-quot-Select-all-quot-Survey-Questions/m-p/699829#M14447</guid>
      <dc:creator>EEARL</dc:creator>
      <dc:date>2020-11-18T15:31:14Z</dc:date>
    </item>
    <item>
      <title>Re: Percentages for "Select all" Survey Questions</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Percentages-for-quot-Select-all-quot-Survey-Questions/m-p/700217#M14454</link>
      <description>&lt;P&gt;Ok, I have another idea&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":smiling_face_with_smiling_eyes:"&gt;😊&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Could you please try this approach?&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Create a &lt;EM&gt;New calculated Item&lt;/EM&gt; to get the number of distinct ID's&lt;BR /&gt;
&lt;PRE&gt;Distinct [_ForAll_] ('ID'n)&lt;/PRE&gt;
&lt;/LI&gt;
&lt;LI&gt;Use the feature &lt;EM&gt;New data from aggregation of...&lt;/EM&gt;&amp;nbsp;&lt;BR /&gt;Selected items: &lt;FONT face="courier new,courier"&gt;Headcount, Response, ID (Distinct count)&lt;/FONT&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;In your newly created table create a &lt;EM&gt;New Calculated Item&lt;/EM&gt; &lt;FONT face="courier new,courier"&gt;Percent&lt;BR /&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;
&lt;PRE&gt;'Headcount'n / 'ID (Distinct count)'n&lt;/PRE&gt;
&lt;FONT face="arial,helvetica,sans-serif"&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;Define the format to be &lt;EM&gt;Percent&lt;/EM&gt;.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;Now use this new data to create the Bar chart and Crosstab.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;Here's image from my report that might help get better grasp of this.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT face="arial,helvetica,sans-serif"&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/51831i6F05E49834EF490C/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.PNG" alt="Capture.PNG" /&gt;&lt;/span&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;I hope this helps and if it doesn't, I think I'm going to need some kind of sample data.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&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;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 20 Nov 2020 06:20:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/Percentages-for-quot-Select-all-quot-Survey-Questions/m-p/700217#M14454</guid>
      <dc:creator>PetriRoine</dc:creator>
      <dc:date>2020-11-20T06:20:13Z</dc:date>
    </item>
    <item>
      <title>Re: Percentages for "Select all" Survey Questions</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Percentages-for-quot-Select-all-quot-Survey-Questions/m-p/700997#M14465</link>
      <description>&lt;P&gt;Thanks for the help, Petri!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Although this solution didn't quite work for us, it does give us some tools to solve related questions we had. For now, our team is tabling this discussion and will return to it in an "office hours" session with SAS representatives in the near future. Much appreciated!&lt;/P&gt;</description>
      <pubDate>Mon, 23 Nov 2020 18:22:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/Percentages-for-quot-Select-all-quot-Survey-Questions/m-p/700997#M14465</guid>
      <dc:creator>EEARL</dc:creator>
      <dc:date>2020-11-23T18:22:39Z</dc:date>
    </item>
  </channel>
</rss>

