<?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: Data wrangle query in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Data-wrangle-query/m-p/693626#M211536</link>
    <description>Thanks much !! it works like a charm !!</description>
    <pubDate>Thu, 22 Oct 2020 23:03:44 GMT</pubDate>
    <dc:creator>dennis_oz</dc:creator>
    <dc:date>2020-10-22T23:03:44Z</dc:date>
    <item>
      <title>Data wrangle query</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Data-wrangle-query/m-p/693613#M211527</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;
&lt;P&gt;I wasn't clear on my previous question and had assumed proc transpose was the way to go .&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I will delete that post and re-post below .&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I haven't posted the whole data , but my columns in the have are about &lt;FONT color="#FF0000"&gt;500 columns&lt;/FONT&gt; .&lt;/P&gt;
&lt;P&gt;Similarly about &lt;FONT color="#3366FF"&gt;500 rows.&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000080"&gt;&lt;STRONG&gt; Please find atttached a Sample-Dimension1.csv with the data that needs to be flipped .&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please let me know if I need to provide further information.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Have&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;
&lt;TABLE width="575"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="340px" height="111px"&gt;FI&lt;/TD&gt;
&lt;TD width="70px" height="111px"&gt;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;101&lt;/STRONG&gt; &lt;/FONT&gt;Capital Region R Uwgt&lt;/TD&gt;
&lt;TD width="164px" height="111px"&gt;&lt;FONT color="#FF0000"&gt;101&lt;/FONT&gt; Capital Region R 000s&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="340px" height="57px"&gt;Health Products Use Vitamins tablets capsules&lt;/TD&gt;
&lt;TD width="70px" height="57px"&gt;66&lt;/TD&gt;
&lt;TD width="164px" height="57px"&gt;64&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="340px" height="30px"&gt;Health Products Use Anti smoking products&lt;/TD&gt;
&lt;TD width="70px" height="30px"&gt;5&lt;/TD&gt;
&lt;TD width="164px" height="30px"&gt;5&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="340px" height="57px"&gt;Anti smoking prdcts Freq Buy Every 2 to 3 months&lt;/TD&gt;
&lt;TD width="70px" height="57px"&gt;0&lt;/TD&gt;
&lt;TD width="164px" height="57px"&gt;0&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="340px" height="57px"&gt;Anti smoking prdcts Freq Buy Every 4 to 6 months&lt;/TD&gt;
&lt;TD width="70px" height="57px"&gt;0&lt;/TD&gt;
&lt;TD width="164px" height="57px"&gt;0&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="340px" height="57px"&gt;Weight Loss Remedies&amp;nbsp;&amp;nbsp; Freq Buy Every 2 to 3 months&lt;/TD&gt;
&lt;TD width="70px" height="57px"&gt;3&lt;/TD&gt;
&lt;TD width="164px" height="57px"&gt;5&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="340px" height="57px"&gt;Weight Loss Remedies&amp;nbsp;&amp;nbsp; Freq Buy Every 4 to 6 months&lt;/TD&gt;
&lt;TD width="70px" height="57px"&gt;0&lt;/TD&gt;
&lt;TD width="164px" height="57px"&gt;0&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&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;&lt;STRONG&gt;Want&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;TABLE width="904"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="169"&gt;F1&lt;/TD&gt;
&lt;TD width="157"&gt;Health Products Use Vitamins tablets capsules&lt;/TD&gt;
&lt;TD width="101"&gt;Health Products Use Anti smoking products&lt;/TD&gt;
&lt;TD width="149"&gt;Anti smoking prdcts Freq Buy Every 4 to 6 months&lt;/TD&gt;
&lt;TD width="136"&gt;Weight Loss Remedies&amp;nbsp;&amp;nbsp; Freq Buy Every 2 to 3 months&lt;/TD&gt;
&lt;TD width="192"&gt;Weight Loss Remedies&amp;nbsp;&amp;nbsp; Freq Buy Every 4 to 6 months&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;101 Capital Region R Uwgt&lt;/TD&gt;
&lt;TD&gt;66&lt;/TD&gt;
&lt;TD&gt;5&lt;/TD&gt;
&lt;TD&gt;0&lt;/TD&gt;
&lt;TD&gt;3&lt;/TD&gt;
&lt;TD&gt;0&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;101 Capital Region R 000s&lt;/TD&gt;
&lt;TD&gt;64&lt;/TD&gt;
&lt;TD&gt;5&lt;/TD&gt;
&lt;TD&gt;0&lt;/TD&gt;
&lt;TD&gt;5&lt;/TD&gt;
&lt;TD&gt;0&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;</description>
      <pubDate>Thu, 22 Oct 2020 22:54:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Data-wrangle-query/m-p/693613#M211527</guid>
      <dc:creator>dennis_oz</dc:creator>
      <dc:date>2020-10-22T22:54:39Z</dc:date>
    </item>
    <item>
      <title>Re: Data wrangle query</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Data-wrangle-query/m-p/693616#M211530</link>
      <description>&lt;P&gt;First, transpose your 500 columns to a long format BY fi.&lt;/P&gt;
&lt;P&gt;Then, run a PROC REPORT with fi as an ACROSS column.&lt;/P&gt;
&lt;P&gt;For code suggestions, provide your dataset in a data step with datalines that&amp;nbsp;&lt;EM&gt;works&lt;/EM&gt; and creates a dataset with&amp;nbsp;&lt;EM&gt;valid SAS names&lt;/EM&gt;.&lt;/P&gt;</description>
      <pubDate>Thu, 22 Oct 2020 21:27:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Data-wrangle-query/m-p/693616#M211530</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-10-22T21:27:11Z</dc:date>
    </item>
    <item>
      <title>Re: Data wrangle query</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Data-wrangle-query/m-p/693619#M211531</link>
      <description>&lt;P&gt;Please provide better HAVE data in the form of a data step with cards data.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
   infile cards expandtabs;
   input FI&amp;amp;$64. a b;
   id + 1;
   label a='101 Capital Region R Uwgt' b='101 Capital Region R 000s';
   cards;
Health Products Use Vitamins tablets capsules	66	64
Health Products Use Anti smoking products	 5	 5
Anti smoking prdcts Freq Buy Every 2 to 3 months   0	0
Anti smoking prdcts Freq Buy Every 4 to 6 months	0	0
Weight Loss Remedies Freq Buy Every 2 to 3 months	3	5
Weight Loss Remedies&amp;nbsp;Freq Buy Every 4 to 6 months	0	0
;;;;
proc print;
   run;

proc transpose data=have out=want(drop=_name_) prefix=FI label=F1;
   var a b;
   id id;
   idlabel fi;
   run;
proc contents varnum;
proc print;
   run;
proc print label;
   label f1=' ';
   run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.PNG" style="width: 801px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/50915iBBFAEAE65A4F8026/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.PNG" alt="Capture.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 22 Oct 2020 21:31:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Data-wrangle-query/m-p/693619#M211531</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2020-10-22T21:31:54Z</dc:date>
    </item>
    <item>
      <title>Re: Data wrangle query</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Data-wrangle-query/m-p/693626#M211536</link>
      <description>Thanks much !! it works like a charm !!</description>
      <pubDate>Thu, 22 Oct 2020 23:03:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Data-wrangle-query/m-p/693626#M211536</guid>
      <dc:creator>dennis_oz</dc:creator>
      <dc:date>2020-10-22T23:03:44Z</dc:date>
    </item>
  </channel>
</rss>

