<?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: How to create total sum/count variable from categorical and numerical variables in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-create-total-sum-count-variable-from-categorical-and/m-p/427881#M105573</link>
    <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/138205"&gt;@novinosrin&lt;/a&gt;&amp;nbsp;I choose to tailor my answers based on the question. No data, then you get an approach solution because I'm not going to make assumptions and have someone come back and say it doesn't work or provide sample data in a different format than I guessed. It's mostly inefficient for me.&lt;/P&gt;
&lt;P&gt;Also, if the data is an image, the code is an image these days. It's maybe a bit petty but I think users also learn more when they have to type it out rather than copy and paste and I do follow that myself, I force myself to type it out line by line.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/78398"&gt;@stancemcgraw&lt;/a&gt;&amp;nbsp;Nothing in this post is related to you directly, more so on general behaviour on the community forums.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 15 Jan 2018 23:35:33 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2018-01-15T23:35:33Z</dc:date>
    <item>
      <title>How to create total sum/count variable from categorical and numerical variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-create-total-sum-count-variable-from-categorical-and/m-p/427868#M105567</link>
      <description>&lt;P&gt;Hello. I have 7&amp;nbsp;categorical variables that are dummy variables coded as Y or N and 2 numerical dummy variables that are coded as 1 or 0. I want to create a variable that counts the total number of 'Y' or 1'' for each of these variables. Any suggestions?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Data screenshot is in attachment below&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 15 Jan 2018 23:00:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-create-total-sum-count-variable-from-categorical-and/m-p/427868#M105567</guid>
      <dc:creator>stancemcgraw</dc:creator>
      <dc:date>2018-01-15T23:00:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to create total sum/count variable from categorical and numerical variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-create-total-sum-count-variable-from-categorical-and/m-p/427871#M105568</link>
      <description>&lt;P&gt;1. Use CATX() to combine all into one character variable.&lt;/P&gt;
&lt;P&gt;2. Use COUNTC() to count the characters of interest. You'll probably need to call this twice, once for Y and once for N.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In general, its better to store Y/N as 1/0 because then you can use SUM() or other basic math functions.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 15 Jan 2018 23:02:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-create-total-sum-count-variable-from-categorical-and/m-p/427871#M105568</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-01-15T23:02:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to create total sum/count variable from categorical and numerical variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-create-total-sum-count-variable-from-categorical-and/m-p/427874#M105569</link>
      <description>&lt;P&gt;I would have liked to code had you given the sample data HAVE and WANTas plain text. Screenshot,pdf or any attachments doesn't help at all.&lt;/P&gt;</description>
      <pubDate>Mon, 15 Jan 2018 23:13:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-create-total-sum-count-variable-from-categorical-and/m-p/427874#M105569</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2018-01-15T23:13:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to create total sum/count variable from categorical and numerical variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-create-total-sum-count-variable-from-categorical-and/m-p/427881#M105573</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/138205"&gt;@novinosrin&lt;/a&gt;&amp;nbsp;I choose to tailor my answers based on the question. No data, then you get an approach solution because I'm not going to make assumptions and have someone come back and say it doesn't work or provide sample data in a different format than I guessed. It's mostly inefficient for me.&lt;/P&gt;
&lt;P&gt;Also, if the data is an image, the code is an image these days. It's maybe a bit petty but I think users also learn more when they have to type it out rather than copy and paste and I do follow that myself, I force myself to type it out line by line.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/78398"&gt;@stancemcgraw&lt;/a&gt;&amp;nbsp;Nothing in this post is related to you directly, more so on general behaviour on the community forums.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 15 Jan 2018 23:35:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-create-total-sum-count-variable-from-categorical-and/m-p/427881#M105573</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-01-15T23:35:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to create total sum/count variable from categorical and numerical variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-create-total-sum-count-variable-from-categorical-and/m-p/427894#M105581</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13879"&gt;@Reeza&lt;/a&gt;&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; true. I got that. Also, I must admit, i code here selfishly for my practice and continued learning. Honestly, not generous yet. Please don't think I am a bad person. lol. I treat this as my school indirectly benefiting OPs. Once I accomplish like you have in career and knowledge, I'd then become selfless.&amp;nbsp; Ok, i am going out for a beer. Have a great evening!&lt;/P&gt;</description>
      <pubDate>Tue, 16 Jan 2018 00:05:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-create-total-sum-count-variable-from-categorical-and/m-p/427894#M105581</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2018-01-16T00:05:52Z</dc:date>
    </item>
  </channel>
</rss>

