<?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 Group and sum observations in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Group-and-sum-observations/m-p/554066#M9443</link>
    <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The main objective I need to accomplish is grouping all observations by the LAP column while also gettinga SUM of all the prices associated with a each LAP.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Some detail about the report that I think may help are as follows:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;The api_call column is a representation of a specific product that we order.&lt;/LI&gt;&lt;LI&gt;Each api_call on the dataset has a different price associated with it depending on the product.&amp;nbsp;&lt;UL&gt;&lt;LI&gt;Not all products are showing on the below screenshot&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;The LAP column encompass multiple api_calls keys.&amp;nbsp;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Below is a picture of the dataset I am currently working with.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2019-04-25 14_31_06-ictsasappem - Remote Desktop Connection.png" style="width: 565px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/29050iA657FDC13B1E037A/image-size/large?v=v2&amp;amp;px=999" role="button" title="2019-04-25 14_31_06-ictsasappem - Remote Desktop Connection.png" alt="2019-04-25 14_31_06-ictsasappem - Remote Desktop Connection.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please let me know if there is any information I need to provide in order to make this easier to solve. Thank you for your time!&lt;/P&gt;</description>
    <pubDate>Thu, 25 Apr 2019 19:51:08 GMT</pubDate>
    <dc:creator>aperansi</dc:creator>
    <dc:date>2019-04-25T19:51:08Z</dc:date>
    <item>
      <title>Group and sum observations</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Group-and-sum-observations/m-p/554066#M9443</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The main objective I need to accomplish is grouping all observations by the LAP column while also gettinga SUM of all the prices associated with a each LAP.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Some detail about the report that I think may help are as follows:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;The api_call column is a representation of a specific product that we order.&lt;/LI&gt;&lt;LI&gt;Each api_call on the dataset has a different price associated with it depending on the product.&amp;nbsp;&lt;UL&gt;&lt;LI&gt;Not all products are showing on the below screenshot&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;The LAP column encompass multiple api_calls keys.&amp;nbsp;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Below is a picture of the dataset I am currently working with.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2019-04-25 14_31_06-ictsasappem - Remote Desktop Connection.png" style="width: 565px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/29050iA657FDC13B1E037A/image-size/large?v=v2&amp;amp;px=999" role="button" title="2019-04-25 14_31_06-ictsasappem - Remote Desktop Connection.png" alt="2019-04-25 14_31_06-ictsasappem - Remote Desktop Connection.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please let me know if there is any information I need to provide in order to make this easier to solve. Thank you for your time!&lt;/P&gt;</description>
      <pubDate>Thu, 25 Apr 2019 19:51:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Group-and-sum-observations/m-p/554066#M9443</guid>
      <dc:creator>aperansi</dc:creator>
      <dc:date>2019-04-25T19:51:08Z</dc:date>
    </item>
    <item>
      <title>Re: Group and sum observations</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Group-and-sum-observations/m-p/554069#M9444</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/228641"&gt;@aperansi&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The main objective I need to accomplish is grouping all observations by the LAP column while also gettinga SUM of all the prices associated with a each LAP.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Some detail about the report that I think may help are as follows:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;The api_call column is a representation of a specific product that we order.&lt;/LI&gt;
&lt;LI&gt;Each api_call on the dataset has a different price associated with it depending on the product.&amp;nbsp;
&lt;UL&gt;
&lt;LI&gt;Not all products are showing on the below screenshot&lt;/LI&gt;
&lt;/UL&gt;
&lt;/LI&gt;
&lt;LI&gt;The LAP column encompass multiple api_calls keys.&amp;nbsp;&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Well, from the first sentence, you seem to want a result that ignores api_call, but you spend some time discussing api_call, which seems to indicate it is of some importance. Perhaps you can clarify?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Anyway, here is some code that might get what you want:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc summary data=have;
    class lap api_call;
    types lap lap*api_call;
    var price;
    output out=want sum=;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 25 Apr 2019 20:03:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Group-and-sum-observations/m-p/554069#M9444</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2019-04-25T20:03:07Z</dc:date>
    </item>
    <item>
      <title>Re: Group and sum observations</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Group-and-sum-observations/m-p/554247#M9470</link>
      <description>Hey Paige, Thank you for your reply. The reason the api_call column is important is that each row that has an api_call has a unique price associated with it. The LAP column is essentially a group of api_calls. In order to get the price of one LAP, I need the various api_calls added together to get me the price. Hope this explanation helps.&lt;BR /&gt;&lt;BR /&gt;I tried to code you wrote out and that didnt work for a few reason. I need the date added in there so i can get the total price for each month down the line.&lt;BR /&gt;&lt;BR /&gt;Also: when I scroll through the data, I am still seeing duplicate LAP keys. There should only be one of these. The only reasons there would be two is because there are multiple api_calls per one LAP.</description>
      <pubDate>Fri, 26 Apr 2019 13:31:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Group-and-sum-observations/m-p/554247#M9470</guid>
      <dc:creator>aperansi</dc:creator>
      <dc:date>2019-04-26T13:31:35Z</dc:date>
    </item>
    <item>
      <title>Re: Group and sum observations</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Group-and-sum-observations/m-p/554268#M9478</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/228641"&gt;@aperansi&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;Hey Paige, Thank you for your reply. The reason the api_call column is important is that each row that has an api_call has a unique price associated with it. The LAP column is essentially a group of api_calls. In order to get the price of one LAP, I need the various api_calls added together to get me the price. Hope this explanation helps.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;This translates in my mind to: you need the sum of price within each LAP. Is that right? I guess I don't see the importance of api_call, you can get the sums without ever looking at the actual api_call number. Is that right?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;SPAN&gt;I need the date added in there so i can get the total price for each month down the line.&lt;/SPAN&gt;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Is the date column an actual SAS date value, formatted to 2019-04, or is it truly the text string 2019-04?&lt;/P&gt;</description>
      <pubDate>Fri, 26 Apr 2019 14:13:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Group-and-sum-observations/m-p/554268#M9478</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2019-04-26T14:13:50Z</dc:date>
    </item>
    <item>
      <title>Re: Group and sum observations</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Group-and-sum-observations/m-p/554278#M9479</link>
      <description>I think we are on the same page. I want the total price of each LAP. So if a LAP appears on there more than once, all the LAPS should be summed and the outcome should only be one LAP.&lt;BR /&gt;&lt;BR /&gt;The date is a SAS date value I believe. It is currently formatted as yymmdd10. I originally got the date from a sql query and converted the datetime using datepart function.</description>
      <pubDate>Fri, 26 Apr 2019 14:18:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Group-and-sum-observations/m-p/554278#M9479</guid>
      <dc:creator>aperansi</dc:creator>
      <dc:date>2019-04-26T14:18:10Z</dc:date>
    </item>
    <item>
      <title>Re: Group and sum observations</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Group-and-sum-observations/m-p/554280#M9480</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc summary data=have nway;
    class date lap;
    var price;
    output out=want sum=;
run;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 26 Apr 2019 14:22:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Group-and-sum-observations/m-p/554280#M9480</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2019-04-26T14:22:21Z</dc:date>
    </item>
    <item>
      <title>Re: Group and sum observations</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Group-and-sum-observations/m-p/554367#M9486</link>
      <description>Thank you for your help Paige!</description>
      <pubDate>Fri, 26 Apr 2019 18:27:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Group-and-sum-observations/m-p/554367#M9486</guid>
      <dc:creator>aperansi</dc:creator>
      <dc:date>2019-04-26T18:27:57Z</dc:date>
    </item>
  </channel>
</rss>

