<?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: Get rows when value of a column reach every multiplication of 15 in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Get-rows-when-value-of-a-column-reach-every-multiplication-of-15/m-p/484445#M125779</link>
    <description>&lt;P&gt;Show us the output you get. Show us the output you want to get. Oh, yeah, also give us the complete data set you are working with.&lt;/P&gt;</description>
    <pubDate>Mon, 06 Aug 2018 16:54:10 GMT</pubDate>
    <dc:creator>PaigeMiller</dc:creator>
    <dc:date>2018-08-06T16:54:10Z</dc:date>
    <item>
      <title>Get rows when value of a column reach every multiplication of 15</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Get-rows-when-value-of-a-column-reach-every-multiplication-of-15/m-p/484158#M125657</link>
      <description>Hi, I have a dataset where the last row has a total cummulative entries value. This value(1094) need to be divided by 12. Then i need to get rows of the dataset when value the cummulative column reach the multiplier value. Eg, 1094/12=91.6.. The output is to get rows when cummulative entries reach 91, 182,273,.... Example,&lt;BR /&gt;&lt;BR /&gt;Name Entries Cumm_entries&lt;BR /&gt;Myn 70 70&lt;BR /&gt;Ann 85 155&lt;BR /&gt;Dave 24 179&lt;BR /&gt;Amy 39 218&lt;BR /&gt;Ram 82 300&lt;BR /&gt;Bay 9 309&lt;BR /&gt;.&lt;BR /&gt;.&lt;BR /&gt;.&lt;BR /&gt;Tom 7 1094&lt;BR /&gt;Since values of cumm entries of 91, 182,273 in row 2nd, 4th and 5th rows, the output that i want is as below:&lt;BR /&gt;&lt;BR /&gt;Name Entries Cumm_entries&lt;BR /&gt;Ann 85 155&lt;BR /&gt;Amy 39 218&lt;BR /&gt;Ram 82 300&lt;BR /&gt;&lt;BR /&gt;Appreciate if any of sifu here can help me.</description>
      <pubDate>Sun, 05 Aug 2018 15:00:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Get-rows-when-value-of-a-column-reach-every-multiplication-of-15/m-p/484158#M125657</guid>
      <dc:creator>saf_nadia</dc:creator>
      <dc:date>2018-08-05T15:00:35Z</dc:date>
    </item>
    <item>
      <title>Re: Get rows when value of a column reach every multiplication of 15</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Get-rows-when-value-of-a-column-reach-every-multiplication-of-15/m-p/484167#M125662</link>
      <description>&lt;P&gt;UNTESTED CODE&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
    set have;
    prev_cumm = lag(cumm_entries);
    if floor(cumm_entries/91) ^= floor(prev_cumm/91) then output;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 05 Aug 2018 15:31:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Get-rows-when-value-of-a-column-reach-every-multiplication-of-15/m-p/484167#M125662</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2018-08-05T15:31:33Z</dc:date>
    </item>
    <item>
      <title>Re: Get rows when value of a column reach every multiplication of 15</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Get-rows-when-value-of-a-column-reach-every-multiplication-of-15/m-p/484169#M125664</link>
      <description>Hi, thanks for your reply. I have few datasets and each has different sizing hence total cummulative also would be different. But each dataset need to be divided by 12. How can I program to get the total cummulative value and divide by 12 for each dataset and then get the rows that have multiplier in it?</description>
      <pubDate>Sun, 05 Aug 2018 15:38:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Get-rows-when-value-of-a-column-reach-every-multiplication-of-15/m-p/484169#M125664</guid>
      <dc:creator>saf_nadia</dc:creator>
      <dc:date>2018-08-05T15:38:56Z</dc:date>
    </item>
    <item>
      <title>Re: Get rows when value of a column reach every multiplication of 15</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Get-rows-when-value-of-a-column-reach-every-multiplication-of-15/m-p/484170#M125665</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql noprint;
    select sum(entries)/12 into :sizing from have;
quit;
data want;
    set have;
    prev_cumm = lag(cumm_entries);
    if floor(cumm_entries/&amp;amp;sizing) ^= floor(prev_cumm/&amp;amp;sizing) then output;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 05 Aug 2018 15:44:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Get-rows-when-value-of-a-column-reach-every-multiplication-of-15/m-p/484170#M125665</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2018-08-05T15:44:07Z</dc:date>
    </item>
    <item>
      <title>Re: Get rows when value of a column reach every multiplication of 15</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Get-rows-when-value-of-a-column-reach-every-multiplication-of-15/m-p/484443#M125777</link>
      <description>I’ve tested but the output is not like I want it to be. The output should be 12 rows only and my cumm_entries values also seem modified</description>
      <pubDate>Mon, 06 Aug 2018 16:46:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Get-rows-when-value-of-a-column-reach-every-multiplication-of-15/m-p/484443#M125777</guid>
      <dc:creator>saf_nadia</dc:creator>
      <dc:date>2018-08-06T16:46:10Z</dc:date>
    </item>
    <item>
      <title>Re: Get rows when value of a column reach every multiplication of 15</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Get-rows-when-value-of-a-column-reach-every-multiplication-of-15/m-p/484445#M125779</link>
      <description>&lt;P&gt;Show us the output you get. Show us the output you want to get. Oh, yeah, also give us the complete data set you are working with.&lt;/P&gt;</description>
      <pubDate>Mon, 06 Aug 2018 16:54:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Get-rows-when-value-of-a-column-reach-every-multiplication-of-15/m-p/484445#M125779</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2018-08-06T16:54:10Z</dc:date>
    </item>
    <item>
      <title>Re: Get rows when value of a column reach every multiplication of 15</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Get-rows-when-value-of-a-column-reach-every-multiplication-of-15/m-p/484611#M125823</link>
      <description>Hi,&lt;BR /&gt;Have tried the code. It does work for 2nd-11th row of output but nit the&lt;BR /&gt;first row. It takes first row of the data as the first row of output. The&lt;BR /&gt;output should exclude the first row but include the last row since&lt;BR /&gt;sizing/12. But the last row of dataset is not the output here.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 07 Aug 2018 04:41:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Get-rows-when-value-of-a-column-reach-every-multiplication-of-15/m-p/484611#M125823</guid>
      <dc:creator>saf_nadia</dc:creator>
      <dc:date>2018-08-07T04:41:22Z</dc:date>
    </item>
  </channel>
</rss>

