<?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 Proc Transpose Missing Field in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Proc-Transpose-Missing-Field/m-p/582213#M13802</link>
    <description>&lt;P&gt;I have&amp;nbsp; 49 month on the data set ( 1 - 49 vertically), when I transpose the data set, I can see month 1 - 47 horizontally as expected but missing month 48 and 49. Does anybody have any idea what might cause this? I already tried to fill blank values with dummy numbers.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;proc transpose data=test out=test_t;&lt;BR /&gt;id month;&lt;BR /&gt;by ID;&lt;BR /&gt;var sale;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;</description>
    <pubDate>Mon, 19 Aug 2019 18:51:39 GMT</pubDate>
    <dc:creator>Will_FBB</dc:creator>
    <dc:date>2019-08-19T18:51:39Z</dc:date>
    <item>
      <title>Proc Transpose Missing Field</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Proc-Transpose-Missing-Field/m-p/582213#M13802</link>
      <description>&lt;P&gt;I have&amp;nbsp; 49 month on the data set ( 1 - 49 vertically), when I transpose the data set, I can see month 1 - 47 horizontally as expected but missing month 48 and 49. Does anybody have any idea what might cause this? I already tried to fill blank values with dummy numbers.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;proc transpose data=test out=test_t;&lt;BR /&gt;id month;&lt;BR /&gt;by ID;&lt;BR /&gt;var sale;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;</description>
      <pubDate>Mon, 19 Aug 2019 18:51:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Proc-Transpose-Missing-Field/m-p/582213#M13802</guid>
      <dc:creator>Will_FBB</dc:creator>
      <dc:date>2019-08-19T18:51:39Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Transpose Missing Field</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Proc-Transpose-Missing-Field/m-p/582214#M13803</link>
      <description>&lt;P&gt;Welcome to the SAS Community &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can you post an example of how your data is structured? Makes it much easier to help you&lt;/P&gt;</description>
      <pubDate>Mon, 19 Aug 2019 18:55:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Proc-Transpose-Missing-Field/m-p/582214#M13803</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2019-08-19T18:55:40Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Transpose Missing Field</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Proc-Transpose-Missing-Field/m-p/582217#M13804</link>
      <description />
      <pubDate>Mon, 19 Aug 2019 19:02:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Proc-Transpose-Missing-Field/m-p/582217#M13804</guid>
      <dc:creator>Will_FBB</dc:creator>
      <dc:date>2019-08-19T19:02:17Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Transpose Missing Field</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Proc-Transpose-Missing-Field/m-p/582225#M13805</link>
      <description>&lt;P&gt;How exactly did you determine that month 48 and month 49 are missing? Proc Contents? Proc Print? Table view?&lt;/P&gt;
&lt;P&gt;"See" is not exactly a precise description as we do not have your settings, system or data.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And what exactly did you do to attempt to "fill blank values with dummy numbers"? That might be an issue.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Since your posted PDF apparently has records for a single ID and does not have values for months 31 through 47 it would be very hard to be sure as to&amp;nbsp;the cause for your full data set.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Aug 2019 19:28:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Proc-Transpose-Missing-Field/m-p/582225#M13805</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2019-08-19T19:28:59Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Transpose Missing Field</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Proc-Transpose-Missing-Field/m-p/582228#M13807</link>
      <description>&lt;P&gt;What does the SAS log say in response to the proc transpose call?&lt;/P&gt;</description>
      <pubDate>Mon, 19 Aug 2019 19:33:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Proc-Transpose-Missing-Field/m-p/582228#M13807</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2019-08-19T19:33:29Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Transpose Missing Field</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Proc-Transpose-Missing-Field/m-p/582232#M13808</link>
      <description>&lt;P&gt;It has thousands of ID in the data set, it misses some months here and there for some ID's, but it does have ID's that have valid values from month 1 - 49. If I have to clean up the data first, it almost defeat the purpose of using transpose.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Aug 2019 19:38:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Proc-Transpose-Missing-Field/m-p/582232#M13808</guid>
      <dc:creator>Will_FBB</dc:creator>
      <dc:date>2019-08-19T19:38:17Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Transpose Missing Field</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Proc-Transpose-Missing-Field/m-p/582234#M13809</link>
      <description>&lt;P&gt;Your code looks right to me..&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data test;
	do id=1 to 3;
		do month=1 to 49;
			sale=rand('integer', 1, 100);
			output;
		end;
	end;
run;

proc transpose data=test out=test_t;
	id month;
	by ID;
	var sale;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 19 Aug 2019 19:42:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Proc-Transpose-Missing-Field/m-p/582234#M13809</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2019-08-19T19:42:25Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Transpose Missing Field</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Proc-Transpose-Missing-Field/m-p/582266#M13811</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/79424"&gt;@Will_FBB&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;It has thousands of ID in the data set, it misses some months here and there for some ID's, but it does have ID's that have valid values from month 1 - 49. If I have to clean up the data first, it almost defeat the purpose of using transpose.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Does not address how you determined missing in the output.&lt;/P&gt;
&lt;P&gt;And did you determine that the values were missing &lt;STRONG&gt;before&lt;/STRONG&gt; attempting to "clean the data"? If not, then your cleaning attempt could be issue.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Sharing thousands of records is not needed but to help us feel a bit more secure in understanding your actual data can you share the actual output of Proc Freq on the Month variable?&lt;/P&gt;</description>
      <pubDate>Mon, 19 Aug 2019 21:23:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Proc-Transpose-Missing-Field/m-p/582266#M13811</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2019-08-19T21:23:38Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Transpose Missing Field</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Proc-Transpose-Missing-Field/m-p/582272#M13812</link>
      <description>&lt;P&gt;I think there is a misunderstanding here. When I say month 48 and 49 are missing, I mean the entire fields are missing. After transpose, month 1 - 49&amp;nbsp; would become field names. Field/Column 48 and 49 are just not there in the output data table.&lt;/P&gt;</description>
      <pubDate>Mon, 19 Aug 2019 21:38:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Proc-Transpose-Missing-Field/m-p/582272#M13812</guid>
      <dc:creator>Will_FBB</dc:creator>
      <dc:date>2019-08-19T21:38:12Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Transpose Missing Field</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Proc-Transpose-Missing-Field/m-p/582273#M13813</link>
      <description>If the log isn't showing an error or warning this means the data is not in your data set as indicated. Please show the results from a proc means or proc freq on the raw data that would indicate the presence of these values.</description>
      <pubDate>Mon, 19 Aug 2019 21:41:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Proc-Transpose-Missing-Field/m-p/582273#M13813</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-08-19T21:41:22Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Transpose Missing Field</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Proc-Transpose-Missing-Field/m-p/582275#M13814</link>
      <description>&lt;P&gt;this is proc tabulate result, this shows you it has valid value for month 48 - 49&lt;/P&gt;</description>
      <pubDate>Mon, 19 Aug 2019 21:49:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Proc-Transpose-Missing-Field/m-p/582275#M13814</guid>
      <dc:creator>Will_FBB</dc:creator>
      <dc:date>2019-08-19T21:49:57Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Transpose Missing Field</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Proc-Transpose-Missing-Field/m-p/582278#M13815</link>
      <description>&lt;P&gt;These types of issues are usually do to a few causes:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1. User error - accidentally referencing the incorrect data set&lt;/P&gt;
&lt;P&gt;2. Errors/Warning/Notes in the log that are missed/ignored&lt;/P&gt;
&lt;P&gt;3. PRELOADFMT being used in tabulate which cannot be used in transpose&lt;/P&gt;
&lt;P&gt;4. Formats applied to a variable in one proc and not another&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You need to show your full code and log for us to verify what's happening now. If you cannot for whatever reason share your code/log, or produce a reasonably replicated situation that mimics your issue, you'll need to contact SAS Tech Support and work with them.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;PROC TRANSPOSE is a proc that's used by many users and any issues would affect a lot of production programs. It's possible there's an issue but not very probable. You can always restart SAS and see if the issue persists.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;EDIT: I can't open attachments so I'll have to take your word for it that the data is there.&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/79424"&gt;@Will_FBB&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;this is proc tabulate result, this shows you it has valid value for month 48 - 49&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Aug 2019 21:59:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Proc-Transpose-Missing-Field/m-p/582278#M13815</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-08-19T21:59:19Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Transpose Missing Field</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Proc-Transpose-Missing-Field/m-p/582284#M13816</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/79424"&gt;@Will_FBB&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;I think there is a misunderstanding here. When I say month 48 and 49 are missing, I mean the entire fields are missing. After transpose, month 1 - 49&amp;nbsp; would become field names. Field/Column 48 and 49 are just not there in the output data table.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;And I have asked twice exactly how you determine that how those fields are missing. From the picture of your data in the first PDF it appears that you may be using EG in some form. I am not sure that the table viewer always shows everything from questions people have posed here. So I ask how you know. And if you ran your "cleaning code", especially if you used a form of:&lt;/P&gt;
&lt;P&gt;data thisset;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; set thisset;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;you have completely replace the original data set and what you have now has only a slight resemblance to the output of proc transpose.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I did a quickish test and had no problem transposing 65,000 records with 49 values of month with the code you show. I suspected a possibly memory issue as I have seen that from proc transpose though usually with more variables involved. A second consideration is the actual system limits you might have imposed by your Admins. My example data set was about 75Mbytes and the transposed 26Mbytes. If you have an allocation limit of disk space maybe something lost, but I would expect a note, warning or error in the log in that case.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Aug 2019 22:34:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Proc-Transpose-Missing-Field/m-p/582284#M13816</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2019-08-19T22:34:17Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Transpose Missing Field</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Proc-Transpose-Missing-Field/m-p/582424#M13834</link>
      <description>&lt;P&gt;I know if I clean the data, it will come out okay. I just wonder there might be some system setting that I could adjust. Thanks for your input!&lt;/P&gt;</description>
      <pubDate>Tue, 20 Aug 2019 13:50:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Proc-Transpose-Missing-Field/m-p/582424#M13834</guid>
      <dc:creator>Will_FBB</dc:creator>
      <dc:date>2019-08-20T13:50:36Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Transpose Missing Field</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Proc-Transpose-Missing-Field/m-p/582456#M13842</link>
      <description>Run a proc freq with the SPARSE option to get all possible combinations and then run your proc transpose on that output. It will include all possible values.</description>
      <pubDate>Tue, 20 Aug 2019 15:00:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Proc-Transpose-Missing-Field/m-p/582456#M13842</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-08-20T15:00:39Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Transpose Missing Field</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Proc-Transpose-Missing-Field/m-p/582499#M13851</link>
      <description>&lt;P&gt;A common trick it to introduce a new new group in the data that has all of the values.&amp;nbsp; This is also frequently done to insure that the names are created in the order wanted.&amp;nbsp; You can even do this using a data step view so that you don't need to make a second copy of your original data.&amp;nbsp; You can then remove the extra group from the output dataset.&amp;nbsp; You should also use the PREFIX= option to tell PROC TRANSPOSE how to name the new variables since names like 1,2,3 etc are not really valid or useful.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data test_fixed / view=test_fixed;
  if 0 then set test;
  if _n_=1 then do month=1 to 49; output; end;
  set test;
run;

proc transpose data=test_fixed prefix=MONTH
  out=test_t(where=(not missing(id)))
;
  by ID;
  id month;
  var sale;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Aug 2019 17:40:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Proc-Transpose-Missing-Field/m-p/582499#M13851</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2019-08-20T17:40:39Z</dc:date>
    </item>
  </channel>
</rss>

