<?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 Finding the percentage of ratings that show changes. in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Finding-the-percentage-of-ratings-that-show-changes/m-p/846817#M334762</link>
    <description>&lt;P&gt;I have two columns in a table.&amp;nbsp;&lt;BR /&gt;I need to find the number of rows in which Rating_a is not equal to Rating_b and then divide that number by the total number of rows in the table. Basically, I need to find the percentage of where the values differ. Could someone please help me with this? I think using the COUNT function could work. Help would be appreciated. Thank you.&lt;BR /&gt;Here's a sample (actual table has 1000s of rows) of how it looks like:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;TABLE border="1" width="100%"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="50%"&gt;&lt;STRONG&gt;Rating_a&amp;nbsp;&amp;nbsp;&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD width="50%"&gt;&lt;STRONG&gt;Rating_b&lt;/STRONG&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="50%"&gt;1&lt;/TD&gt;
&lt;TD width="50%"&gt;1&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="50%"&gt;2&lt;/TD&gt;
&lt;TD width="50%"&gt;3&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="50%"&gt;4&lt;/TD&gt;
&lt;TD width="50%"&gt;4&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="50%"&gt;4&lt;/TD&gt;
&lt;TD width="50%"&gt;1&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="50%"&gt;3&lt;/TD&gt;
&lt;TD width="50%"&gt;
&lt;P&gt;3&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;</description>
    <pubDate>Tue, 29 Nov 2022 14:30:56 GMT</pubDate>
    <dc:creator>SASuser4321</dc:creator>
    <dc:date>2022-11-29T14:30:56Z</dc:date>
    <item>
      <title>Finding the percentage of ratings that show changes.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Finding-the-percentage-of-ratings-that-show-changes/m-p/846817#M334762</link>
      <description>&lt;P&gt;I have two columns in a table.&amp;nbsp;&lt;BR /&gt;I need to find the number of rows in which Rating_a is not equal to Rating_b and then divide that number by the total number of rows in the table. Basically, I need to find the percentage of where the values differ. Could someone please help me with this? I think using the COUNT function could work. Help would be appreciated. Thank you.&lt;BR /&gt;Here's a sample (actual table has 1000s of rows) of how it looks like:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;TABLE border="1" width="100%"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="50%"&gt;&lt;STRONG&gt;Rating_a&amp;nbsp;&amp;nbsp;&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD width="50%"&gt;&lt;STRONG&gt;Rating_b&lt;/STRONG&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="50%"&gt;1&lt;/TD&gt;
&lt;TD width="50%"&gt;1&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="50%"&gt;2&lt;/TD&gt;
&lt;TD width="50%"&gt;3&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="50%"&gt;4&lt;/TD&gt;
&lt;TD width="50%"&gt;4&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="50%"&gt;4&lt;/TD&gt;
&lt;TD width="50%"&gt;1&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="50%"&gt;3&lt;/TD&gt;
&lt;TD width="50%"&gt;
&lt;P&gt;3&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;</description>
      <pubDate>Tue, 29 Nov 2022 14:30:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Finding-the-percentage-of-ratings-that-show-changes/m-p/846817#M334762</guid>
      <dc:creator>SASuser4321</dc:creator>
      <dc:date>2022-11-29T14:30:56Z</dc:date>
    </item>
    <item>
      <title>Re: Finding the percentage of ratings that show changes.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Finding-the-percentage-of-ratings-that-show-changes/m-p/846820#M334764</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
select sum(rating_a = rating_b) / count(*) as percentage format=percent7.2 from have;
quit;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 29 Nov 2022 14:40:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Finding-the-percentage-of-ratings-that-show-changes/m-p/846820#M334764</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2022-11-29T14:40:08Z</dc:date>
    </item>
    <item>
      <title>Re: Finding the percentage of ratings that show changes.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Finding-the-percentage-of-ratings-that-show-changes/m-p/846823#M334765</link>
      <description>&lt;P&gt;Would there ever be missing values? How would those be handled?&lt;/P&gt;</description>
      <pubDate>Tue, 29 Nov 2022 14:42:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Finding-the-percentage-of-ratings-that-show-changes/m-p/846823#M334765</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2022-11-29T14:42:36Z</dc:date>
    </item>
    <item>
      <title>Re: Finding the percentage of ratings that show changes.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Finding-the-percentage-of-ratings-that-show-changes/m-p/846829#M334771</link>
      <description>To show changes, one would have to write "rating_a ne rating_b" instead of using the = sign. But thank you for your answer. I understood it and it works and I'm accepting it &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;</description>
      <pubDate>Tue, 29 Nov 2022 14:54:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Finding-the-percentage-of-ratings-that-show-changes/m-p/846829#M334771</guid>
      <dc:creator>SASuser4321</dc:creator>
      <dc:date>2022-11-29T14:54:46Z</dc:date>
    </item>
  </channel>
</rss>

