<?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: Present one row per observation in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Present-one-row-per-observation/m-p/552071#M9103</link>
    <description>Yes, but not using such a simple program.  The first step is for you to decide what the solution should look like.  In your design, be sure to show the right outcome for both one numeric and one character variable with multiple values.&lt;BR /&gt;&lt;BR /&gt;One preliminary question:  is it important for you to understand the solution, or is it only important that it works?</description>
    <pubDate>Thu, 18 Apr 2019 12:03:09 GMT</pubDate>
    <dc:creator>Astounding</dc:creator>
    <dc:date>2019-04-18T12:03:09Z</dc:date>
    <item>
      <title>Present one row per observation</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Present-one-row-per-observation/m-p/551806#M9054</link>
      <description>&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have my dataset and I am having troubles with organizing it. Namely, I have different variables that are stored in different rows for the same participant. But the trick is that these two variables relate to the same participant (according to his id number). What is the possible way to present or to transpose the variables so that I will have for each participant (according to his id) variables in the same row? I mean, for each participant to have all values of his corresponding variables within the same row?&lt;/P&gt;</description>
      <pubDate>Wed, 17 Apr 2019 16:54:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Present-one-row-per-observation/m-p/551806#M9054</guid>
      <dc:creator>Aleksandar</dc:creator>
      <dc:date>2019-04-17T16:54:04Z</dc:date>
    </item>
    <item>
      <title>Re: Present one row per observation</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Present-one-row-per-observation/m-p/551807#M9055</link>
      <description>&lt;P&gt;Show us a portion of your data, using this method:&amp;nbsp;&lt;A href="https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-data-AKA-generate/ta-p/258712" target="_blank"&gt;https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-data-AKA-generate/ta-p/258712&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 17 Apr 2019 16:55:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Present-one-row-per-observation/m-p/551807#M9055</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2019-04-17T16:55:16Z</dc:date>
    </item>
    <item>
      <title>Re: Present one row per observation</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Present-one-row-per-observation/m-p/551808#M9056</link>
      <description>&lt;P&gt;What I basically have is id_in_group that represents participant and different variables are stored in different rows with the same id_in_group. I want to create for corresponding participant (id__in_group) just one row where all variables that relate to him will be stored in only one row. What I have now is the same participant stored in many rows just where each row represent one variable related to him. The code that I have run was the following (here I include just one variable):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;PROC TRANSPOSE DATA=Session2.Combined_datasets OUT=Session2.Combined_datasets_just_in_rows;&lt;BR /&gt;ID IP2000_2years_D;&lt;BR /&gt;BY id_in_group;&lt;BR /&gt;VAR IP2000_2years_D;&lt;BR /&gt;RUN;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could you please give me some advice on how to solvve this problem?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Wed, 17 Apr 2019 17:12:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Present-one-row-per-observation/m-p/551808#M9056</guid>
      <dc:creator>Aleksandar</dc:creator>
      <dc:date>2019-04-17T17:12:32Z</dc:date>
    </item>
    <item>
      <title>Re: Present one row per observation</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Present-one-row-per-observation/m-p/551811#M9057</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/271047"&gt;@Aleksandar&lt;/a&gt;&amp;nbsp; Welcome to SAS communities. What we need is&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1. A sample data of what you HAVE (paste here as text for us to copy paste and work with it)&lt;/P&gt;
&lt;P&gt;2. A sample data of what you WANT(your expected output for the input sample)&lt;/P&gt;
&lt;P&gt;3. A brief explanation of the convert/business logic and that is your objective&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;That;s all we need. If you could provide the above 3, somebody will help you with the much needed solution. Thank you!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 17 Apr 2019 17:18:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Present-one-row-per-observation/m-p/551811#M9057</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2019-04-17T17:18:09Z</dc:date>
    </item>
    <item>
      <title>Re: Present one row per observation</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Present-one-row-per-observation/m-p/551815#M9058</link>
      <description>&lt;P&gt;It's a little bit of a guess, but here is what I think you are looking for:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sort data=have;
   by id_number;
run;

data want;
update have (obs=0) have;
by id_number;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Theoretically, there is some question as to what should happen if you have different values for the same variable on different observations.&amp;nbsp; This program takes the last non-missing value found for each variable.&lt;/P&gt;</description>
      <pubDate>Wed, 17 Apr 2019 17:47:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Present-one-row-per-observation/m-p/551815#M9058</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2019-04-17T17:47:31Z</dc:date>
    </item>
    <item>
      <title>Re: Present one row per observation</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Present-one-row-per-observation/m-p/551851#M9061</link>
      <description>&lt;P&gt;Thank you very much,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;it helped a lot.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 17 Apr 2019 18:35:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Present-one-row-per-observation/m-p/551851#M9061</guid>
      <dc:creator>Aleksandar</dc:creator>
      <dc:date>2019-04-17T18:35:01Z</dc:date>
    </item>
    <item>
      <title>Re: Present one row per observation</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Present-one-row-per-observation/m-p/551911#M9073</link>
      <description>&lt;P&gt;HI&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/271047"&gt;@Aleksandar&lt;/a&gt;&amp;nbsp; &amp;nbsp;Glad to note&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/4954"&gt;@Astounding&lt;/a&gt;&amp;nbsp; could understand your question and offer the correct solution. Could you please that solution as accepted and close the thread as answered. Thank you and enjoy your time in SAS communities&lt;/P&gt;</description>
      <pubDate>Wed, 17 Apr 2019 21:43:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Present-one-row-per-observation/m-p/551911#M9073</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2019-04-17T21:43:20Z</dc:date>
    </item>
    <item>
      <title>Re: Present one row per observation</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Present-one-row-per-observation/m-p/552025#M9095</link>
      <description>&lt;P&gt;Actually I have a small question. Your last sentence attracted my attention. The issue is that I have participants with the same id_group_number and therefore I need to include in some cases (for some and not all) two values per variable. What is the possible way to solve that problem?&lt;/P&gt;</description>
      <pubDate>Thu, 18 Apr 2019 08:13:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Present-one-row-per-observation/m-p/552025#M9095</guid>
      <dc:creator>Aleksandar</dc:creator>
      <dc:date>2019-04-18T08:13:47Z</dc:date>
    </item>
    <item>
      <title>Re: Present one row per observation</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Present-one-row-per-observation/m-p/552071#M9103</link>
      <description>Yes, but not using such a simple program.  The first step is for you to decide what the solution should look like.  In your design, be sure to show the right outcome for both one numeric and one character variable with multiple values.&lt;BR /&gt;&lt;BR /&gt;One preliminary question:  is it important for you to understand the solution, or is it only important that it works?</description>
      <pubDate>Thu, 18 Apr 2019 12:03:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Present-one-row-per-observation/m-p/552071#M9103</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2019-04-18T12:03:09Z</dc:date>
    </item>
  </channel>
</rss>

