<?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 Multiply rows base on values in field in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Multiply-rows-base-on-values-in-field/m-p/232860#M42456</link>
    <description>&lt;P&gt;Hi&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please help me with below problem. I need to multiply rows based on the value in the field. For example my data like this below:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Name Window&lt;/P&gt;
&lt;P&gt;Moh&amp;nbsp;&amp;nbsp;&amp;nbsp; 3&lt;/P&gt;
&lt;P&gt;Raj&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 4&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would like my output to be mulitplied w..r.t window&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Name Window&lt;/P&gt;
&lt;P&gt;Moh&amp;nbsp;&amp;nbsp; 3&lt;/P&gt;
&lt;P&gt;Moh&amp;nbsp;&amp;nbsp; 3&lt;/P&gt;
&lt;P&gt;Moh&amp;nbsp;&amp;nbsp; 3&lt;/P&gt;
&lt;P&gt;Raj&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 4&lt;/P&gt;
&lt;P&gt;Raj&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 4&lt;/P&gt;
&lt;P&gt;Raj&amp;nbsp;&amp;nbsp;&amp;nbsp; 4&lt;/P&gt;
&lt;P&gt;Raj&amp;nbsp;&amp;nbsp; 4&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am not able to think how can I approach this problem. Any hints are welcome&lt;/P&gt;</description>
    <pubDate>Tue, 03 Nov 2015 08:22:28 GMT</pubDate>
    <dc:creator>bnarang</dc:creator>
    <dc:date>2015-11-03T08:22:28Z</dc:date>
    <item>
      <title>Multiply rows base on values in field</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Multiply-rows-base-on-values-in-field/m-p/232860#M42456</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please help me with below problem. I need to multiply rows based on the value in the field. For example my data like this below:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Name Window&lt;/P&gt;
&lt;P&gt;Moh&amp;nbsp;&amp;nbsp;&amp;nbsp; 3&lt;/P&gt;
&lt;P&gt;Raj&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 4&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would like my output to be mulitplied w..r.t window&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Name Window&lt;/P&gt;
&lt;P&gt;Moh&amp;nbsp;&amp;nbsp; 3&lt;/P&gt;
&lt;P&gt;Moh&amp;nbsp;&amp;nbsp; 3&lt;/P&gt;
&lt;P&gt;Moh&amp;nbsp;&amp;nbsp; 3&lt;/P&gt;
&lt;P&gt;Raj&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 4&lt;/P&gt;
&lt;P&gt;Raj&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 4&lt;/P&gt;
&lt;P&gt;Raj&amp;nbsp;&amp;nbsp;&amp;nbsp; 4&lt;/P&gt;
&lt;P&gt;Raj&amp;nbsp;&amp;nbsp; 4&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am not able to think how can I approach this problem. Any hints are welcome&lt;/P&gt;</description>
      <pubDate>Tue, 03 Nov 2015 08:22:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Multiply-rows-base-on-values-in-field/m-p/232860#M42456</guid>
      <dc:creator>bnarang</dc:creator>
      <dc:date>2015-11-03T08:22:28Z</dc:date>
    </item>
    <item>
      <title>Re: Multiply rows base on values in field</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Multiply-rows-base-on-values-in-field/m-p/232863#M42458</link>
      <description>&lt;PRE&gt;data newdata; 
Window = Window; 
input Name$ Window; 
do i = 1 to Window; 
output; 
end; 
datalines; 
Moh 3 
Raj 4 &lt;BR /&gt;; 
run;
Proc Print data = newdata;
run;&lt;/PRE&gt;</description>
      <pubDate>Tue, 03 Nov 2015 08:34:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Multiply-rows-base-on-values-in-field/m-p/232863#M42458</guid>
      <dc:creator>pearsoninst</dc:creator>
      <dc:date>2015-11-03T08:34:33Z</dc:date>
    </item>
    <item>
      <title>Re: Multiply rows base on values in field</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Multiply-rows-base-on-values-in-field/m-p/232864#M42459</link>
      <description>&lt;P&gt;Thanks a lot. It worked&lt;/P&gt;</description>
      <pubDate>Tue, 03 Nov 2015 08:36:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Multiply-rows-base-on-values-in-field/m-p/232864#M42459</guid>
      <dc:creator>bnarang</dc:creator>
      <dc:date>2015-11-03T08:36:50Z</dc:date>
    </item>
    <item>
      <title>Re: Multiply rows base on values in field</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Multiply-rows-base-on-values-in-field/m-p/232865#M42460</link>
      <description>welcome</description>
      <pubDate>Tue, 03 Nov 2015 08:37:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Multiply-rows-base-on-values-in-field/m-p/232865#M42460</guid>
      <dc:creator>pearsoninst</dc:creator>
      <dc:date>2015-11-03T08:37:51Z</dc:date>
    </item>
    <item>
      <title>Re: Multiply rows base on values in field</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Multiply-rows-base-on-values-in-field/m-p/234986#M43011</link>
      <description>&lt;P&gt;Do you always have to specify the values in "Window"? Can this be modified for the case with lots of names?&lt;/P&gt;</description>
      <pubDate>Tue, 17 Nov 2015 10:36:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Multiply-rows-base-on-values-in-field/m-p/234986#M43011</guid>
      <dc:creator>David2</dc:creator>
      <dc:date>2015-11-17T10:36:09Z</dc:date>
    </item>
    <item>
      <title>Re: Multiply rows base on values in field</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Multiply-rows-base-on-values-in-field/m-p/235014#M43022</link>
      <description>&lt;PRE&gt;Window = Window; it will calculate the number you have specified in the the variable window.&lt;BR /&gt;So Moh has 3 window so when do loop start i will take 3 (i = 1 to 3 )with the first obs which is raj and then &lt;BR /&gt;i will take 4 (i = 1 to 4 ) and the window value in Raj has 4 . And it will work with lots of names . &lt;BR /&gt;&lt;BR /&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 17 Nov 2015 14:09:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Multiply-rows-base-on-values-in-field/m-p/235014#M43022</guid>
      <dc:creator>pearsoninst</dc:creator>
      <dc:date>2015-11-17T14:09:53Z</dc:date>
    </item>
    <item>
      <title>Re: Multiply rows base on values in field</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Multiply-rows-base-on-values-in-field/m-p/235025#M43024</link>
      <description>&lt;P&gt;OK thanks,&amp;nbsp;&amp;nbsp;In the datalines argument Moh and Raj have been specified. Can these be done 'on the fly'?&lt;/P&gt;</description>
      <pubDate>Tue, 17 Nov 2015 14:51:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Multiply-rows-base-on-values-in-field/m-p/235025#M43024</guid>
      <dc:creator>David2</dc:creator>
      <dc:date>2015-11-17T14:51:33Z</dc:date>
    </item>
  </channel>
</rss>

