<?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: Proc Tabulate - Some records were not included because of missing values in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Proc-Tabulate-Some-records-were-not-included-because-of-missing/m-p/857429#M338805</link>
    <description>&lt;P&gt;You are getting an error? First thing for you to do is to LOOK AT the data set with your own eyes to see if missing values are present which could be a problem. If that doesn't help ...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Show us the LOG from your code. We need to see the &lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;ENTIRE&lt;/FONT&gt; &lt;/STRONG&gt;log. Please copy the log as text and paste it into the window that appears when you click on the &amp;lt;/&amp;gt; icon. Please follows these instructions carefully.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="PaigeMiller_0-1663012019648.png" style="width: 859px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/75161i0E71B1489A6C9839/image-size/large?v=v2&amp;amp;px=999" role="button" title="PaigeMiller_0-1663012019648.png" alt="PaigeMiller_0-1663012019648.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;We also need a portion of the actual data, presented as SAS data step code. You can type it in yourself &lt;A href="https://communities.sas.com/t5/SAS-Programming/Proc-Tabulate-Percent/m-p/716134#M221273" target="_self"&gt;as Cynthia did&lt;/A&gt; in your earlier thread, or follow &lt;A href="https://blogs.sas.com/content/sastraining/2016/03/11/jedi-sas-tricks-data-to-data-step-macro/" target="_self"&gt;these instructions&lt;/A&gt;.&lt;/P&gt;</description>
    <pubDate>Mon, 06 Feb 2023 20:18:13 GMT</pubDate>
    <dc:creator>PaigeMiller</dc:creator>
    <dc:date>2023-02-06T20:18:13Z</dc:date>
    <item>
      <title>Proc Tabulate - Some records were not included because of missing values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Tabulate-Some-records-were-not-included-because-of-missing/m-p/857427#M338804</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to code get a tabulate to work to output all my different outcomes in one table, but i am having issues. I am getting the error&amp;nbsp;&lt;/P&gt;&lt;P&gt;Some records were not included because of missing values&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am not sure why this is or how to get round it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have code up variables as a flag = 1 if it meets the criteria.&amp;nbsp;&lt;/P&gt;&lt;P&gt;E.g.&lt;/P&gt;&lt;P&gt;If X &amp;gt; 1 then Var1 = 1;&lt;/P&gt;&lt;P&gt;If Y &amp;gt; 250 then Var 2 = 1;&lt;/P&gt;&lt;P&gt;Count = 1;&lt;/P&gt;&lt;P&gt;etc.&lt;/P&gt;&lt;P&gt;I am then trying to split these by a flag. I have the data create a mock data shown below:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Flag&lt;/TD&gt;&lt;TD&gt;Var1&lt;/TD&gt;&lt;TD&gt;Var2&lt;/TD&gt;&lt;TD&gt;Var3&lt;/TD&gt;&lt;TD&gt;Var4&lt;/TD&gt;&lt;TD&gt;Weight&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Yes&lt;/TD&gt;&lt;TD&gt;.&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;.&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;No&lt;/TD&gt;&lt;TD&gt;.&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;.&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;2.5&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Maybe&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;.&lt;/TD&gt;&lt;TD&gt;.&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Potential&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;.&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;.&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Yes&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;.&lt;/TD&gt;&lt;TD&gt;.&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;From that data I am then trying to code it to look like this&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then i produce the code&lt;/P&gt;&lt;P&gt;PROC TABULATE DATA = DATA;&lt;BR /&gt;TABLES Var1 Var2 Var3 Var4, Flag*(COUNT);&lt;BR /&gt;CLASS E1_A_01_HIT E1_A_02_HIT E1_A_03_HIT&lt;BR /&gt;GBF;&lt;BR /&gt;VAR COUNT / WEIGHT = Weight;&lt;BR /&gt;RUN;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am after the table so i can get it all in one table. All the Flags Yes, No maybe etc would be populated with a number but for this example you can see what I am aiming for. Do you know how to populated this from the table and why the error is being created or another way of getting the table i am after.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;TABLE border="0" cellspacing="0" cellpadding="0"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;Yes&lt;/TD&gt;&lt;TD&gt;No&lt;/TD&gt;&lt;TD&gt;Maybe&lt;/TD&gt;&lt;TD&gt;Potential&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Var1&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Var2&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;2.5&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Var3&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Var4&lt;/TD&gt;&lt;TD&gt;4&lt;/TD&gt;&lt;TD&gt;1.5&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;PLEASE FIND THE CODE.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;data ORIGINAL;&lt;/P&gt;&lt;P&gt;input VAR1 VAR2 VAR3 VAR4 VAR5 WEIGHT FLAG $;&lt;/P&gt;&lt;P&gt;datalines;&lt;/P&gt;&lt;P&gt;1 1 . . . 2.5 Z&lt;/P&gt;&lt;P&gt;1 1 1 1 1 4 Y&lt;/P&gt;&lt;P&gt;1 1 . . . 2.5 X&lt;/P&gt;&lt;P&gt;1 1 . . 1 1 Z&lt;/P&gt;&lt;P&gt;1 . 1 1 . 1 Z&lt;/P&gt;&lt;P&gt;1 . 1 1 . 1 Y&lt;/P&gt;&lt;P&gt;1 . . . . 3 X&lt;/P&gt;&lt;P&gt;;&lt;BR /&gt;RUN;&lt;BR /&gt;DATA ORIGINAL; SET ORIGINAL;&lt;BR /&gt;COUNT =1;&lt;BR /&gt;RUN;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;PROC TABULATE DATA = ORIGINAL;&lt;BR /&gt;TABLES VAR1 VAR2 VAR3 VAR4 VAR5, FLAG*(COUNT);&lt;BR /&gt;CLASS VAR1 VAR2 VAR3 VAR4 VAR5&lt;BR /&gt;FLAG;&lt;BR /&gt;VAR COUNT / WEIGHT = WEIGHT;&lt;BR /&gt;RUN;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;THE LOG&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;10547 PROC TABULATE DATA = ORIGINAL;&lt;BR /&gt;10548 TABLES VAR1 VAR2 VAR3 VAR4 VAR5, FLAG*(COUNT);&lt;BR /&gt;10549 CLASS VAR1 VAR2 VAR3 VAR4 VAR5&lt;BR /&gt;10550 FLAG;&lt;BR /&gt;10551 VAR COUNT / WEIGHT = WEIGHT;&lt;BR /&gt;10552 RUN;&lt;BR /&gt;NOTE: Some records were not included because of missing values&lt;BR /&gt;NOTE: 7 observations were read from "WORK.ORIGINAL"&lt;BR /&gt;NOTE: Procedure TABULATE step took :&lt;BR /&gt;real time : 0.006&lt;BR /&gt;cpu time : 0.015&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;10553 quit; run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;PROC FREQ DATA = ORIGINAL; TABLE (VAR1 VAR2 VAR3 VAR4 VAR5)*FLAG / NOROW NOCOL NOPERCENT; WEIGHT WEIGHT;&lt;BR /&gt;RUN;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;the Proc Freq outputs what i would like to see but not in the single table i would of would much prefer.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;</description>
      <pubDate>Mon, 06 Feb 2023 20:23:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Tabulate-Some-records-were-not-included-because-of-missing/m-p/857427#M338804</guid>
      <dc:creator>Mick_bill</dc:creator>
      <dc:date>2023-02-06T20:23:28Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Tabulate - Some records were not included because of missing values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Tabulate-Some-records-were-not-included-because-of-missing/m-p/857429#M338805</link>
      <description>&lt;P&gt;You are getting an error? First thing for you to do is to LOOK AT the data set with your own eyes to see if missing values are present which could be a problem. If that doesn't help ...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Show us the LOG from your code. We need to see the &lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;ENTIRE&lt;/FONT&gt; &lt;/STRONG&gt;log. Please copy the log as text and paste it into the window that appears when you click on the &amp;lt;/&amp;gt; icon. Please follows these instructions carefully.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="PaigeMiller_0-1663012019648.png" style="width: 859px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/75161i0E71B1489A6C9839/image-size/large?v=v2&amp;amp;px=999" role="button" title="PaigeMiller_0-1663012019648.png" alt="PaigeMiller_0-1663012019648.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;We also need a portion of the actual data, presented as SAS data step code. You can type it in yourself &lt;A href="https://communities.sas.com/t5/SAS-Programming/Proc-Tabulate-Percent/m-p/716134#M221273" target="_self"&gt;as Cynthia did&lt;/A&gt; in your earlier thread, or follow &lt;A href="https://blogs.sas.com/content/sastraining/2016/03/11/jedi-sas-tricks-data-to-data-step-macro/" target="_self"&gt;these instructions&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Mon, 06 Feb 2023 20:18:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Tabulate-Some-records-were-not-included-because-of-missing/m-p/857429#M338805</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2023-02-06T20:18:13Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Tabulate - Some records were not included because of missing values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Tabulate-Some-records-were-not-included-because-of-missing/m-p/857432#M338806</link>
      <description>&lt;P&gt;Sorry, this has been added.&lt;/P&gt;</description>
      <pubDate>Mon, 06 Feb 2023 20:23:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Tabulate-Some-records-were-not-included-because-of-missing/m-p/857432#M338806</guid>
      <dc:creator>Mick_bill</dc:creator>
      <dc:date>2023-02-06T20:23:59Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Tabulate - Some records were not included because of missing values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Tabulate-Some-records-were-not-included-because-of-missing/m-p/857435#M338807</link>
      <description>&lt;P&gt;It's less than crystal clear where you are headed, but here are some general ideas.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It may be a good idea to set your new variables to 1 or 0, rather than 1 or missing.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And PROC TABULATE automatically excludes any observation that has a missing value for any CLASS variable.&amp;nbsp; You can override that by adding the word MISSING (I believe it goes on the PROC statement).&lt;/P&gt;</description>
      <pubDate>Mon, 06 Feb 2023 20:31:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Tabulate-Some-records-were-not-included-because-of-missing/m-p/857435#M338807</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2023-02-06T20:31:29Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Tabulate - Some records were not included because of missing values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Tabulate-Some-records-were-not-included-because-of-missing/m-p/857493#M338826</link>
      <description>&lt;P&gt;I agree that it is incomprehensible what you actually have or want to display.&lt;/P&gt;
&lt;P&gt;You show code:&lt;/P&gt;
&lt;PRE&gt;If X &amp;gt; 1 then Var1 = 1;
If Y &amp;gt; 250 then Var 2 = 1;&lt;/PRE&gt;
&lt;P&gt;but your data set Original has no variable X or Y. You aren't particularly clear about what should happen with X is &amp;lt;= to 1, or Y&amp;lt;=250.&lt;/P&gt;
&lt;P&gt;You have tabulate code using variables E1_A_01_HIT E1_A_02_HIT E1_A_03_HIT which are also not in "Original" data. Which do not have any obvious correlation with the data that you do show. And where are you setting the "flag" variable get Yes No Maybe Potential? Your "data" has 3 values for the Flag but you show 5 rows of output. Plus tabulate would group the first Yes with the second Yes values.&lt;/P&gt;</description>
      <pubDate>Tue, 07 Feb 2023 06:13:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Tabulate-Some-records-were-not-included-because-of-missing/m-p/857493#M338826</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2023-02-07T06:13:54Z</dc:date>
    </item>
  </channel>
</rss>

