<?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: Percent of Column (and row) using a Distinct count value in SAS Visual Analytics</title>
    <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Percent-of-Column-and-row-using-a-Distinct-count-value/m-p/616278#M13413</link>
    <description>&lt;P&gt;Hi Gary,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can create Percent of Total only when the measure uses the Sum or Count aggregations. With Distinct, it is not available.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Your best approach is probably to create a copy of the table where there is only one row for each student ID, and use that when you do not need the course data.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Sam&lt;/P&gt;</description>
    <pubDate>Thu, 09 Jan 2020 18:51:47 GMT</pubDate>
    <dc:creator>Sam_SAS</dc:creator>
    <dc:date>2020-01-09T18:51:47Z</dc:date>
    <item>
      <title>Percent of Column (and row) using a Distinct count value</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Percent-of-Column-and-row-using-a-Distinct-count-value/m-p/616267#M13412</link>
      <description>&lt;P&gt;Greetings everyone,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;First, I apologize if this has been posted before, but any search I do only brings up information for SAS VA 7.4 or below or Viya.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We just upgraded to SAS VA 7.5 this week and I have been asked to add a percent of the total to an existing report. The report is student enrollment by full-time and part-time, ethnicity and gender. The data that drives this report is a table of all coursework students have taken for a given term and year so student IDs are duplicated due to students taking multiple classes. I could create a new table but that is additional space on the LASR server for data that actually already exists.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I use the Distinct [_ByGroup_] ('Student_ID'n) aggregated measure to display unduplicated headcounts for the various fields in the report. I have included an image of the report.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Right clicking on the column heading for gender or headcount does not give me the option to create a percent of row or column. If I create a calculated item for each gender and place that in the crosstab I do see the option for creating the percent values I need, but the percent values are then based on duplicated student IDs not the unique/unduplicated values in my aggregated measure Headcount value.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there a way I can create percent of totals on the unduplicated student ID count?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I did try this but it isn't valid;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;IF ( 'Student Gender'n Contains 'Female' )&lt;BR /&gt;RETURN&amp;nbsp;Distinct [_ByGroup_] ('Student_ID'n)&lt;BR /&gt;ELSE 0&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Thank you and I do apologize if this has been answered.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Gary&lt;/P&gt;</description>
      <pubDate>Thu, 09 Jan 2020 17:02:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/Percent-of-Column-and-row-using-a-Distinct-count-value/m-p/616267#M13412</guid>
      <dc:creator>ghartge</dc:creator>
      <dc:date>2020-01-09T17:02:32Z</dc:date>
    </item>
    <item>
      <title>Re: Percent of Column (and row) using a Distinct count value</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Percent-of-Column-and-row-using-a-Distinct-count-value/m-p/616278#M13413</link>
      <description>&lt;P&gt;Hi Gary,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can create Percent of Total only when the measure uses the Sum or Count aggregations. With Distinct, it is not available.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Your best approach is probably to create a copy of the table where there is only one row for each student ID, and use that when you do not need the course data.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Sam&lt;/P&gt;</description>
      <pubDate>Thu, 09 Jan 2020 18:51:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/Percent-of-Column-and-row-using-a-Distinct-count-value/m-p/616278#M13413</guid>
      <dc:creator>Sam_SAS</dc:creator>
      <dc:date>2020-01-09T18:51:47Z</dc:date>
    </item>
    <item>
      <title>Re: Percent of Column (and row) using a Distinct count value</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Percent-of-Column-and-row-using-a-Distinct-count-value/m-p/616313#M13419</link>
      <description>&lt;P&gt;Thank you Sam!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I understand. What I ended up doing was to add a column in my data based on the hierarchy of my report; Year, Term, Full/Part Time, Student ID. This identifies the first instance of a student with those attributes by marking it with the number 1. All other instances of the same Year, Term, Full/Part Time, Student ID were identified as a 0 for that student. This gave me a measure of distinct count that I could use for column percentages.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This appears to be working great as long as the hierarchy remains the same and keeps me from using more space on the LASR server.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks again!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Gary&lt;/P&gt;</description>
      <pubDate>Thu, 09 Jan 2020 20:22:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/Percent-of-Column-and-row-using-a-Distinct-count-value/m-p/616313#M13419</guid>
      <dc:creator>ghartge</dc:creator>
      <dc:date>2020-01-09T20:22:18Z</dc:date>
    </item>
  </channel>
</rss>

