<?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: Amount Movement in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Amount-Movement/m-p/861224#M340191</link>
    <description>&lt;P&gt;What are the rules involved if the previous month total "holdings" is less than that of the current month? or more than the current month?&lt;/P&gt;
&lt;P&gt;Or the customer did not exist in the previous month?&lt;/P&gt;
&lt;P&gt;After a clear definition of what is done there, then perhaps the equal case that you show is a derivative of one of the more complex cases.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Without knowing anything about your products or operations my first thought was that you may be making a bunch of assumptions that aren't quite valid. What if the customer had moved ALL of B into A, then moved some back into B by the next report period? Your proposed summary is not quite what happened.&lt;/P&gt;</description>
    <pubDate>Mon, 27 Feb 2023 21:06:00 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2023-02-27T21:06:00Z</dc:date>
    <item>
      <title>Amount Movement</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Amount-Movement/m-p/861161#M340164</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm comparing current month and previous month data, to check for the amount drop and movement between the products.&lt;/P&gt;&lt;P&gt;Please consider the below example:-&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;Previous month data&lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt;&lt;P&gt;CUSTOMER_ID&amp;nbsp; &amp;nbsp;MONTH&amp;nbsp; &amp;nbsp; &amp;nbsp; PRDT_TYPE&amp;nbsp; &amp;nbsp; &amp;nbsp;ACCOUNT_BALANCE&lt;BR /&gt;XXX&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 30-Sep-22&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;PRDT A&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 25,000&lt;BR /&gt;XXX&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 30-Sep-22&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;PRDT B&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 30,000&lt;/P&gt;&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;Current Month data&lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt;&lt;P&gt;CUSTOMER_ID&amp;nbsp; &amp;nbsp; MONTH&amp;nbsp; &amp;nbsp; &amp;nbsp; PRDT_TYPE&amp;nbsp; &amp;nbsp;ACCOUNT_BALANCE&lt;BR /&gt;XXX&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;31-Oct-22&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; PRDT A&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;30,000&lt;BR /&gt;XXX&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;31-Oct-22&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; PRDT B&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 10,000&lt;BR /&gt;XXX&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;31-Oct-22&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; PRDT C&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;15,000&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1. In previous month, customer has &lt;STRONG&gt;two&lt;/STRONG&gt; products and hold total amount 55k&lt;/P&gt;&lt;P&gt;2.&amp;nbsp;In current month, customer has &lt;STRONG&gt;three &lt;/STRONG&gt;products &lt;STRONG&gt;(opened new product - PRDT C)&lt;/STRONG&gt;&amp;nbsp;and hold total amount 55k.&amp;nbsp;&lt;/P&gt;&lt;P&gt;3. When comparing previous and current month data - customer moved his/her amount as follows from one to another products.&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;STRONG&gt;TO PRODUCT&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;FROM PRODUCT&lt;/STRONG&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;PRDT A&amp;nbsp; &amp;nbsp; PRDT C&lt;BR /&gt;PRDT B&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;5K&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 15K&lt;/P&gt;&lt;P&gt;I'm not sure, what would be the best approach to track these amount movements in SAS.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could someone of you help me on this ?&lt;/P&gt;&lt;P&gt;Thanks in advance for your help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 27 Feb 2023 17:28:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Amount-Movement/m-p/861161#M340164</guid>
      <dc:creator>AshokD</dc:creator>
      <dc:date>2023-02-27T17:28:29Z</dc:date>
    </item>
    <item>
      <title>Re: Amount Movement</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Amount-Movement/m-p/861168#M340166</link>
      <description>&lt;P&gt;First, we need example data as working SAS data step code — and not in any other form, not in file attachments, not in screen captures — which you can type in yourself, or follow &lt;A href="https://blogs.sas.com/content/sastraining/2016/03/11/jedi-sas-tricks-data-to-data-step-macro/" target="_self"&gt;these instructions&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Mon, 27 Feb 2023 17:55:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Amount-Movement/m-p/861168#M340166</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2023-02-27T17:55:03Z</dc:date>
    </item>
    <item>
      <title>Re: Amount Movement</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Amount-Movement/m-p/861224#M340191</link>
      <description>&lt;P&gt;What are the rules involved if the previous month total "holdings" is less than that of the current month? or more than the current month?&lt;/P&gt;
&lt;P&gt;Or the customer did not exist in the previous month?&lt;/P&gt;
&lt;P&gt;After a clear definition of what is done there, then perhaps the equal case that you show is a derivative of one of the more complex cases.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Without knowing anything about your products or operations my first thought was that you may be making a bunch of assumptions that aren't quite valid. What if the customer had moved ALL of B into A, then moved some back into B by the next report period? Your proposed summary is not quite what happened.&lt;/P&gt;</description>
      <pubDate>Mon, 27 Feb 2023 21:06:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Amount-Movement/m-p/861224#M340191</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2023-02-27T21:06:00Z</dc:date>
    </item>
  </channel>
</rss>

