<?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 Calculate percentage of rank based on category and sub-categories in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Calculate-percentage-of-rank-based-on-category-and-sub/m-p/700309#M214305</link>
    <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The below table display ranking given by emp for different physical fitness test(like Exercise, Diet, Running etc.). with rank=1 as very low and 5 as very high.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I need to assign category and sub-category for the below table based on below condition.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;e.g. "Fitness1" category will be assigned for variable &lt;SPAN&gt;Exercise,&amp;nbsp;Diet,&amp;nbsp;Running&amp;nbsp; having two sub-categories Fit1, Fit2 for above variable.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Variable&amp;nbsp; Category&amp;nbsp; &amp;nbsp; subcategory&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;Exercise&amp;nbsp; Fitness1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Fit1&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;Diet&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Fitness1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Fit1&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;Running&amp;nbsp; Fitness1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Fit2&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;jogging&amp;nbsp; &amp;nbsp; Fitness2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Fit1&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;playing&amp;nbsp; &amp;nbsp; &amp;nbsp;Fitness2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Fit4&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;swimming Fitness3&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Fit1&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;riding&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Fitness3&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Fit1&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;dancing&amp;nbsp; &amp;nbsp; &amp;nbsp; Fitness3&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Fit1&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;sleeping&amp;nbsp; &amp;nbsp; &amp;nbsp; Fitness3&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Fit5&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;After that, I need to calculate the % of rank for each emp based on cat and subcat.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kindly help me . The data are confusing&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data employee;
input eid ename Exercise $ Diet $ Running $ jogging $ playing $ swimming $ riding $ dancing $ sleeping $;
cards;
102 Harish 3 1 1 1 1 3 1 5 1
104 Manu 1 2 1 5 1 3 3 1 2
102 Harish 3 1 2 1 1 3 1 1 1
103 Ram 1 2 2 5 1 3 3 1 1
103 Ram 2 1 1 1 1 3 1 4 1
101 Rakesh 1 2 1 1 1 1 1 1 5
101 Rakesh 1 1 1 4 1 1 1 1 1
106 Gopal 5 1 1 1 1 1 1 3 1
101 Rakesh 1 1 1 1 1 4 1 1 1
;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 19 Nov 2020 19:32:38 GMT</pubDate>
    <dc:creator>abraham1</dc:creator>
    <dc:date>2020-11-19T19:32:38Z</dc:date>
    <item>
      <title>Calculate percentage of rank based on category and sub-categories</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Calculate-percentage-of-rank-based-on-category-and-sub/m-p/700309#M214305</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The below table display ranking given by emp for different physical fitness test(like Exercise, Diet, Running etc.). with rank=1 as very low and 5 as very high.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I need to assign category and sub-category for the below table based on below condition.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;e.g. "Fitness1" category will be assigned for variable &lt;SPAN&gt;Exercise,&amp;nbsp;Diet,&amp;nbsp;Running&amp;nbsp; having two sub-categories Fit1, Fit2 for above variable.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Variable&amp;nbsp; Category&amp;nbsp; &amp;nbsp; subcategory&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;Exercise&amp;nbsp; Fitness1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Fit1&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;Diet&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Fitness1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Fit1&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;Running&amp;nbsp; Fitness1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Fit2&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;jogging&amp;nbsp; &amp;nbsp; Fitness2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Fit1&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;playing&amp;nbsp; &amp;nbsp; &amp;nbsp;Fitness2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Fit4&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;swimming Fitness3&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Fit1&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;riding&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Fitness3&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Fit1&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;dancing&amp;nbsp; &amp;nbsp; &amp;nbsp; Fitness3&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Fit1&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;sleeping&amp;nbsp; &amp;nbsp; &amp;nbsp; Fitness3&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Fit5&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;After that, I need to calculate the % of rank for each emp based on cat and subcat.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kindly help me . The data are confusing&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data employee;
input eid ename Exercise $ Diet $ Running $ jogging $ playing $ swimming $ riding $ dancing $ sleeping $;
cards;
102 Harish 3 1 1 1 1 3 1 5 1
104 Manu 1 2 1 5 1 3 3 1 2
102 Harish 3 1 2 1 1 3 1 1 1
103 Ram 1 2 2 5 1 3 3 1 1
103 Ram 2 1 1 1 1 3 1 4 1
101 Rakesh 1 2 1 1 1 1 1 1 5
101 Rakesh 1 1 1 4 1 1 1 1 1
106 Gopal 5 1 1 1 1 1 1 3 1
101 Rakesh 1 1 1 1 1 4 1 1 1
;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 19 Nov 2020 19:32:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Calculate-percentage-of-rank-based-on-category-and-sub/m-p/700309#M214305</guid>
      <dc:creator>abraham1</dc:creator>
      <dc:date>2020-11-19T19:32:38Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate percentage of rank based on category and sub-categories</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Calculate-percentage-of-rank-based-on-category-and-sub/m-p/700311#M214306</link>
      <description>Sorry, it is not clear to me what you are trying to do.&lt;BR /&gt;I assume the above employee dataset is what you have, and you want to add category/subcategory to that. I just don't understand the logic&lt;BR /&gt;Can you provide the expected output for the above input</description>
      <pubDate>Thu, 19 Nov 2020 19:40:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Calculate-percentage-of-rank-based-on-category-and-sub/m-p/700311#M214306</guid>
      <dc:creator>AMSAS</dc:creator>
      <dc:date>2020-11-19T19:40:46Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate percentage of rank based on category and sub-categories</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Calculate-percentage-of-rank-based-on-category-and-sub/m-p/700317#M214309</link>
      <description>&lt;P&gt;My requirement is to calculate rank-wise percentage based on cat and subcat. How can I add those two variable into master table for below calculation.&lt;/P&gt;&lt;P&gt;--&amp;gt;Can we create three separate table and store respective category information and then merge it through Ename.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Category&lt;/TD&gt;&lt;TD&gt;subcategory&lt;/TD&gt;&lt;TD&gt;Percentage&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Fitness1&lt;/TD&gt;&lt;TD&gt;Fit1&lt;/TD&gt;&lt;TD&gt;x%&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;Fit2&lt;/TD&gt;&lt;TD&gt;x%&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Fitness2&lt;/TD&gt;&lt;TD&gt;Fit1&lt;/TD&gt;&lt;TD&gt;x%&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;Fit4&lt;/TD&gt;&lt;TD&gt;x%&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Fitness3&lt;/TD&gt;&lt;TD&gt;Fit1&lt;/TD&gt;&lt;TD&gt;x%&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;Fit5&lt;/TD&gt;&lt;TD&gt;x%&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;</description>
      <pubDate>Thu, 19 Nov 2020 19:57:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Calculate-percentage-of-rank-based-on-category-and-sub/m-p/700317#M214309</guid>
      <dc:creator>abraham1</dc:creator>
      <dc:date>2020-11-19T19:57:05Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate percentage of rank based on category and sub-categories</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Calculate-percentage-of-rank-based-on-category-and-sub/m-p/700319#M214310</link>
      <description>&lt;P&gt;To calculate percentages we need to know a numerator and a denominator.&lt;/P&gt;
&lt;P&gt;Which is hard to tell from your want (NO NUMBERS which should be based on your example data) and better yet a description of exactly how anything is calculated.&lt;/P&gt;</description>
      <pubDate>Thu, 19 Nov 2020 20:09:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Calculate-percentage-of-rank-based-on-category-and-sub/m-p/700319#M214310</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2020-11-19T20:09:35Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate percentage of rank based on category and sub-categories</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Calculate-percentage-of-rank-based-on-category-and-sub/m-p/700321#M214312</link>
      <description>Can you please guide me how category and sub category will be added to table. I will check pct later. How can I transpose data to get results</description>
      <pubDate>Thu, 19 Nov 2020 20:16:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Calculate-percentage-of-rank-based-on-category-and-sub/m-p/700321#M214312</guid>
      <dc:creator>abraham1</dc:creator>
      <dc:date>2020-11-19T20:16:46Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate percentage of rank based on category and sub-categories</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Calculate-percentage-of-rank-based-on-category-and-sub/m-p/700352#M214327</link>
      <description>&lt;P&gt;Like the others, I also have no idea of the relationship between the table you present and the data you show.&lt;/P&gt;</description>
      <pubDate>Thu, 19 Nov 2020 21:32:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Calculate-percentage-of-rank-based-on-category-and-sub/m-p/700352#M214327</guid>
      <dc:creator>mkeintz</dc:creator>
      <dc:date>2020-11-19T21:32:55Z</dc:date>
    </item>
  </channel>
</rss>

