<?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: How do i move these values to the intended specific rows and insert blank rows in between them? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-do-i-move-these-values-to-the-intended-specific-rows-and/m-p/846965#M334846</link>
    <description>&lt;P&gt;If you are just trying to print a report just use a data step and the PUT statement.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
  set have;
  put group / param / criteria / 'count' @20 value / ;
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;PRE&gt;colors
red
&amp;gt;3
count              2

colors
blue
&amp;lt;3
count              3

cars
ford
&amp;gt;55
count              34

cars
chevy
&amp;gt;23
count              45
&lt;/PRE&gt;</description>
    <pubDate>Wed, 30 Nov 2022 03:21:34 GMT</pubDate>
    <dc:creator>Tom</dc:creator>
    <dc:date>2022-11-30T03:21:34Z</dc:date>
    <item>
      <title>How do i move these values to the intended specific rows and insert blank rows in between them?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-i-move-these-values-to-the-intended-specific-rows-and/m-p/846928#M334822</link>
      <description>&lt;P&gt;Hi i'm trying to move the values in GROUP and PARAM in the same column as the values in criteria and put blank rows in between them. What is the most efficient way to do this?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
infile datalines dsd dlm=",";
	input group $ param $ criteria $ value $;
datalines;
colors, red, &amp;gt;3, 2
colors, blue, &amp;lt;3, 3
cars, ford, &amp;gt;55, 34
cars, chevy, &amp;gt;23, 45
;
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;desired output:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Hello_there_0-1669757942150.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/77832iB610A7BFD0344E5E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Hello_there_0-1669757942150.png" alt="Hello_there_0-1669757942150.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;edited (how it's supposed to really look like):&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Hello_there_0-1669765075791.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/77834i413C45FB410FA895/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Hello_there_0-1669765075791.png" alt="Hello_there_0-1669765075791.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Nov 2022 23:38:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-i-move-these-values-to-the-intended-specific-rows-and/m-p/846928#M334822</guid>
      <dc:creator>Hello_there</dc:creator>
      <dc:date>2022-11-29T23:38:11Z</dc:date>
    </item>
    <item>
      <title>Re: How do i move these values to the intended specific rows and insert blank rows in between them?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-i-move-these-values-to-the-intended-specific-rows-and/m-p/846943#M334835</link>
      <description>&lt;P&gt;Why do you want to change your data set to this really unusual and difficult-to-work-with arrangement?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is it for some sort of table?&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Can you provide more of the actual problem, rather than then details of SAS coding?&lt;/P&gt;</description>
      <pubDate>Tue, 29 Nov 2022 22:30:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-i-move-these-values-to-the-intended-specific-rows-and/m-p/846943#M334835</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2022-11-29T22:30:01Z</dc:date>
    </item>
    <item>
      <title>Re: How do i move these values to the intended specific rows and insert blank rows in between them?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-i-move-these-values-to-the-intended-specific-rows-and/m-p/846948#M334840</link>
      <description>Hi PaigeMiller, I am working on a table. I agree this is really unusual and it is a difficult-to-work-with arrangement, but that was what requested and that's what i have to work with unfortunately. &lt;BR /&gt;&lt;BR /&gt;The actual problem is the values (group and param) are in different columns but on the same row as the criteria and value (in the original data set). But it's supposed to look like so the group is on top of the param, and both of those are in the same column on top of the criteria text and the word "count". This is difficult for me bc in my real life example there are many combos of group and param and it doesn't do well for me to hard code. I was hoping some others had encountered a similar problem and could share their wisdom on how to navigate this.&lt;BR /&gt;&lt;BR /&gt;I changed the table for what it's supposed to be closer like in the OP. &lt;BR /&gt;</description>
      <pubDate>Tue, 29 Nov 2022 23:37:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-i-move-these-values-to-the-intended-specific-rows-and/m-p/846948#M334840</guid>
      <dc:creator>Hello_there</dc:creator>
      <dc:date>2022-11-29T23:37:27Z</dc:date>
    </item>
    <item>
      <title>Re: How do i move these values to the intended specific rows and insert blank rows in between them?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-i-move-these-values-to-the-intended-specific-rows-and/m-p/846965#M334846</link>
      <description>&lt;P&gt;If you are just trying to print a report just use a data step and the PUT statement.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
  set have;
  put group / param / criteria / 'count' @20 value / ;
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;PRE&gt;colors
red
&amp;gt;3
count              2

colors
blue
&amp;lt;3
count              3

cars
ford
&amp;gt;55
count              34

cars
chevy
&amp;gt;23
count              45
&lt;/PRE&gt;</description>
      <pubDate>Wed, 30 Nov 2022 03:21:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-i-move-these-values-to-the-intended-specific-rows-and/m-p/846965#M334846</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2022-11-30T03:21:34Z</dc:date>
    </item>
    <item>
      <title>Re: How do i move these values to the intended specific rows and insert blank rows in between them?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-i-move-these-values-to-the-intended-specific-rows-and/m-p/846975#M334848</link>
      <description>Hi Tom,&lt;BR /&gt;&lt;BR /&gt;I'm actually trying to create a data set. But thanks for showing me this.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 30 Nov 2022 06:11:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-i-move-these-values-to-the-intended-specific-rows-and/m-p/846975#M334848</guid>
      <dc:creator>Hello_there</dc:creator>
      <dc:date>2022-11-30T06:11:55Z</dc:date>
    </item>
    <item>
      <title>Re: How do i move these values to the intended specific rows and insert blank rows in between them?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-i-move-these-values-to-the-intended-specific-rows-and/m-p/846978#M334850</link>
      <description>&lt;P&gt;The best thing i could come up (sort order matters in the end as it will be sorted BY GROUP PARAM CRITERIA). I say this because currently this doesn't match the desired output in the OP, but that's ok.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want; set have; output; output; output; run;
proc sort; by group param criteria; run;

data want1; set want;
   by group param criteria;
    if first.param and first.criteria then count=0; count +1;
    
    if count=1 then do;
    	criteria=group;
    	value="";
    end;
    if count=2 then do;
    	criteria=param;
    	value="";
   	end;
   	
   	keep criteria value;
run;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 30 Nov 2022 06:45:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-i-move-these-values-to-the-intended-specific-rows-and/m-p/846978#M334850</guid>
      <dc:creator>Hello_there</dc:creator>
      <dc:date>2022-11-30T06:45:31Z</dc:date>
    </item>
  </channel>
</rss>

