<?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 How do I seperate responses to a &amp;quot;check all that apply&amp;quot; variable in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-seperate-responses-to-a-quot-check-all-that-apply-quot/m-p/946144#M370561</link>
    <description>&lt;P&gt;I have a variable (race) that has 15 levels.&amp;nbsp; The levels are coded 1-13, 888, 999.&amp;nbsp; This was a check all that apply question, so multiple codes appear in the same cell, seperated by a comma (,).&amp;nbsp; In the past I have used the find function to create flag variables for each level (see below for code), however because the variable levels include more than one digit this produces inaccurate values.&amp;nbsp; For example a respondent that selected level 13 is being counted as level 3 as well.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2024-10-03 112249.jpg" style="width: 435px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/100871i52AEF586D6C2A86B/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2024-10-03 112249.jpg" alt="Screenshot 2024-10-03 112249.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;PRE&gt;data two;
    set one;
    if find(race, '1')&amp;gt;0 then race_1=1;
    if find(race, '2')&amp;gt;0 then race_2=1;
    if find(race, '3')&amp;gt;0 then race_3=1;
    if find(race, '4')&amp;gt;0 then race_4=1;
    if find(race, '5')&amp;gt;0 then race_5=1;
    if find(race, '6')&amp;gt;0 then race_6=1;
    if find(race, '7')&amp;gt;0 then race_7=1;
    if find(race, '8')&amp;gt;0 then race_8=1;
    if find(race, '9')&amp;gt;0 then race_9=1;
    if find(race, '10')&amp;gt;0 then race_10=1;
    if find(race, '11')&amp;gt;0 then race_11=1;
    if find(race, '12')&amp;gt;0 then race_12=1;
    if find(race, '13')&amp;gt;0 then race_13=1;
    if find(race, '888')&amp;gt;0 then race_888=1;
    if race=999 or race=' ' then race_999=1;
run;&lt;/PRE&gt;&lt;/DIV&gt;</description>
    <pubDate>Thu, 03 Oct 2024 15:28:36 GMT</pubDate>
    <dc:creator>CJK7</dc:creator>
    <dc:date>2024-10-03T15:28:36Z</dc:date>
    <item>
      <title>How do I seperate responses to a "check all that apply" variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-seperate-responses-to-a-quot-check-all-that-apply-quot/m-p/946144#M370561</link>
      <description>&lt;P&gt;I have a variable (race) that has 15 levels.&amp;nbsp; The levels are coded 1-13, 888, 999.&amp;nbsp; This was a check all that apply question, so multiple codes appear in the same cell, seperated by a comma (,).&amp;nbsp; In the past I have used the find function to create flag variables for each level (see below for code), however because the variable levels include more than one digit this produces inaccurate values.&amp;nbsp; For example a respondent that selected level 13 is being counted as level 3 as well.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2024-10-03 112249.jpg" style="width: 435px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/100871i52AEF586D6C2A86B/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2024-10-03 112249.jpg" alt="Screenshot 2024-10-03 112249.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;PRE&gt;data two;
    set one;
    if find(race, '1')&amp;gt;0 then race_1=1;
    if find(race, '2')&amp;gt;0 then race_2=1;
    if find(race, '3')&amp;gt;0 then race_3=1;
    if find(race, '4')&amp;gt;0 then race_4=1;
    if find(race, '5')&amp;gt;0 then race_5=1;
    if find(race, '6')&amp;gt;0 then race_6=1;
    if find(race, '7')&amp;gt;0 then race_7=1;
    if find(race, '8')&amp;gt;0 then race_8=1;
    if find(race, '9')&amp;gt;0 then race_9=1;
    if find(race, '10')&amp;gt;0 then race_10=1;
    if find(race, '11')&amp;gt;0 then race_11=1;
    if find(race, '12')&amp;gt;0 then race_12=1;
    if find(race, '13')&amp;gt;0 then race_13=1;
    if find(race, '888')&amp;gt;0 then race_888=1;
    if race=999 or race=' ' then race_999=1;
run;&lt;/PRE&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 03 Oct 2024 15:28:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-I-seperate-responses-to-a-quot-check-all-that-apply-quot/m-p/946144#M370561</guid>
      <dc:creator>CJK7</dc:creator>
      <dc:date>2024-10-03T15:28:36Z</dc:date>
    </item>
    <item>
      <title>Re: How do I seperate responses to a "check all that apply" variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-seperate-responses-to-a-quot-check-all-that-apply-quot/m-p/946149#M370562</link>
      <description>&lt;P&gt;Use FINDW() instead.&lt;/P&gt;</description>
      <pubDate>Thu, 03 Oct 2024 15:31:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-I-seperate-responses-to-a-quot-check-all-that-apply-quot/m-p/946149#M370562</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2024-10-03T15:31:42Z</dc:date>
    </item>
  </channel>
</rss>

