<?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: Apply value of one row to multiple rows in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Apply-value-of-one-row-to-multiple-rows/m-p/790496#M253103</link>
    <description>&lt;P&gt;UNTESTED CODE&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
    create table want as select *,max(nbcure) as max_nbcure from have
    group by subjid;
quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;From now on, do not provide data as screen captures, we can't work with data that is in a screen capture. The way to provide data in the future, without exception, is as SAS data step code (&lt;A href="https://blogs.sas.com/content/sastraining/2016/03/11/jedi-sas-tricks-data-to-data-step-macro/" target="_self"&gt;instructions&lt;/A&gt;) and not in any other format.&lt;/P&gt;</description>
    <pubDate>Mon, 17 Jan 2022 11:24:16 GMT</pubDate>
    <dc:creator>PaigeMiller</dc:creator>
    <dc:date>2022-01-17T11:24:16Z</dc:date>
    <item>
      <title>Apply value of one row to multiple rows</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Apply-value-of-one-row-to-multiple-rows/m-p/790495#M253102</link>
      <description>&lt;P&gt;I made a data base combining the answers to 4 questionnaires for each ID. So I have 4 lines per subjid, &lt;BR /&gt;one for each questionnaire (different visit times). From the answers I created a new variable giving the&lt;BR /&gt;number of Cures for each person. Only to carry out my analyses I would need the value to appear on the 4 &lt;BR /&gt;lines for each id. I don't know how to do this...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is my table for a better idea&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture d’écran 2022-01-17 114819.png" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/67457i4BC980EEFC436EE9/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture d’écran 2022-01-17 114819.png" alt="Capture d’écran 2022-01-17 114819.png" /&gt;&lt;/span&gt;&lt;BR /&gt;Here is an idea of the result i need&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture d’écran 2022-01-17 1819.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/67459iC65E2118C3A54FDA/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Capture d’écran 2022-01-17 1819.png" alt="Capture d’écran 2022-01-17 1819.png" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 17 Jan 2022 16:27:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Apply-value-of-one-row-to-multiple-rows/m-p/790495#M253102</guid>
      <dc:creator>laplanca</dc:creator>
      <dc:date>2022-01-17T16:27:44Z</dc:date>
    </item>
    <item>
      <title>Re: Apply value of one row to multiple rows</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Apply-value-of-one-row-to-multiple-rows/m-p/790496#M253103</link>
      <description>&lt;P&gt;UNTESTED CODE&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
    create table want as select *,max(nbcure) as max_nbcure from have
    group by subjid;
quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;From now on, do not provide data as screen captures, we can't work with data that is in a screen capture. The way to provide data in the future, without exception, is as SAS data step code (&lt;A href="https://blogs.sas.com/content/sastraining/2016/03/11/jedi-sas-tricks-data-to-data-step-macro/" target="_self"&gt;instructions&lt;/A&gt;) and not in any other format.&lt;/P&gt;</description>
      <pubDate>Mon, 17 Jan 2022 11:24:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Apply-value-of-one-row-to-multiple-rows/m-p/790496#M253103</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2022-01-17T11:24:16Z</dc:date>
    </item>
    <item>
      <title>Re: Apply value of one row to multiple rows</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Apply-value-of-one-row-to-multiple-rows/m-p/790501#M253107</link>
      <description>&lt;P&gt;UNTESTED CODE&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;data want;
 merge have(drop=nbcure) 
       have(keep=subjid nbcure where=(nbcure is not missing));
 by subjid;
run;&lt;/PRE&gt;</description>
      <pubDate>Mon, 17 Jan 2022 12:22:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Apply-value-of-one-row-to-multiple-rows/m-p/790501#M253107</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2022-01-17T12:22:10Z</dc:date>
    </item>
  </channel>
</rss>

