<?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 Adding variables if values are missing in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Adding-variables-if-values-are-missing/m-p/888159#M350915</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am creating a table, but there are no values for two trt groups. How can I add them?&lt;/P&gt;&lt;P&gt;Below is the example, c3 and c4 are missing.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="anyalamadugu_0-1691423507823.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/86497iFC1BBBE37CF12B4C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="anyalamadugu_0-1691423507823.png" alt="anyalamadugu_0-1691423507823.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;&lt;P&gt;Adi&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 07 Aug 2023 15:52:29 GMT</pubDate>
    <dc:creator>chinna0369</dc:creator>
    <dc:date>2023-08-07T15:52:29Z</dc:date>
    <item>
      <title>Adding variables if values are missing</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Adding-variables-if-values-are-missing/m-p/888159#M350915</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am creating a table, but there are no values for two trt groups. How can I add them?&lt;/P&gt;&lt;P&gt;Below is the example, c3 and c4 are missing.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="anyalamadugu_0-1691423507823.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/86497iFC1BBBE37CF12B4C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="anyalamadugu_0-1691423507823.png" alt="anyalamadugu_0-1691423507823.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;&lt;P&gt;Adi&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 07 Aug 2023 15:52:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Adding-variables-if-values-are-missing/m-p/888159#M350915</guid>
      <dc:creator>chinna0369</dc:creator>
      <dc:date>2023-08-07T15:52:29Z</dc:date>
    </item>
    <item>
      <title>Re: Adding variables if values are missing</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Adding-variables-if-values-are-missing/m-p/888165#M350917</link>
      <description>&lt;P&gt;"How" would typically involve a data step.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The picture you have implies there are no variables C3, C4 (and possibly C6, C7 and C8). If that is correct an there are no values in the data set and you want to add variables that have missing values it could be as&amp;nbsp; simple as:&lt;/P&gt;
&lt;PRE&gt;data want;
   set have;
   C3=.;
   C4=.;
run;&lt;/PRE&gt;
&lt;P&gt;&lt;STRONG&gt;But, &lt;/STRONG&gt;since you show what I consider pretty poor data, as in two values in each of those variables one might ask exactly what properties you expect to see for the two added variables. While answering that I would suggest looking where this came from and perhaps there is something that needs to be addressed earlier as this looks like possibly the result of transposing or something else to an existing data.&amp;nbsp; &lt;/P&gt;</description>
      <pubDate>Mon, 07 Aug 2023 16:08:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Adding-variables-if-values-are-missing/m-p/888165#M350917</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2023-08-07T16:08:27Z</dc:date>
    </item>
    <item>
      <title>Re: Adding variables if values are missing</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Adding-variables-if-values-are-missing/m-p/888175#M350923</link>
      <description>&lt;P&gt;Yes, I am transposing the results which are coming from proc means. I got it now, I have created dummy dataset with all possible trt groups and added before transposing the dataset. Now it looks good. Thanks!&lt;/P&gt;</description>
      <pubDate>Mon, 07 Aug 2023 16:44:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Adding-variables-if-values-are-missing/m-p/888175#M350923</guid>
      <dc:creator>chinna0369</dc:creator>
      <dc:date>2023-08-07T16:44:55Z</dc:date>
    </item>
    <item>
      <title>Re: Adding variables if values are missing</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Adding-variables-if-values-are-missing/m-p/888211#M350940</link>
      <description>&lt;P&gt;Depending on your data since you are using Proc means or summary you may want to look at the documentation of the COMPLETETYPES procedure option if you are using Class variables. That will create all the combinations for all the class variables so this may help prevent this in the future. May not. But if you are sub-setting data and transposing it may be helpful.&lt;/P&gt;</description>
      <pubDate>Mon, 07 Aug 2023 19:14:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Adding-variables-if-values-are-missing/m-p/888211#M350940</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2023-08-07T19:14:32Z</dc:date>
    </item>
  </channel>
</rss>

