<?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: extract last record from Quarter and add it to another variable to find sum in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/extract-last-record-from-Quarter-and-add-it-to-another-variable/m-p/705164#M216256</link>
    <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/354671"&gt;@Cho8&lt;/a&gt;&amp;nbsp;, the best way to get help on this matter is to provide us the data in the desired form, rather than ignoring the request. I specifically stated what that was.&lt;/P&gt;</description>
    <pubDate>Thu, 10 Dec 2020 18:29:12 GMT</pubDate>
    <dc:creator>PaigeMiller</dc:creator>
    <dc:date>2020-12-10T18:29:12Z</dc:date>
    <item>
      <title>extract last record from Quarter and add it to another variable to find sum</title>
      <link>https://communities.sas.com/t5/SAS-Programming/extract-last-record-from-Quarter-and-add-it-to-another-variable/m-p/705124#M216233</link>
      <description>&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Q420&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;6733.755169&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;.&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;571.4417845&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;.&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;363.2532938&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;.&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;.&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;.&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;126.4904378&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;.&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;18.189424&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;x=13857.20&lt;/P&gt;&lt;P&gt;I want to extract last in the Quarter, Quarter and year are changing dynamically. (i.e.Q320,Q420,Q120,Q220)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;extract last record and add it to x.&lt;/P&gt;</description>
      <pubDate>Thu, 10 Dec 2020 17:18:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/extract-last-record-from-Quarter-and-add-it-to-another-variable/m-p/705124#M216233</guid>
      <dc:creator>Cho8</dc:creator>
      <dc:date>2020-12-10T17:18:30Z</dc:date>
    </item>
    <item>
      <title>Re: extract last record from Quarter and add it to another variable to find sum</title>
      <link>https://communities.sas.com/t5/SAS-Programming/extract-last-record-from-Quarter-and-add-it-to-another-variable/m-p/705130#M216236</link>
      <description>&lt;P&gt;Please explain further. I don't understand your words, and I don't see how they relate to the data you show.&lt;/P&gt;</description>
      <pubDate>Thu, 10 Dec 2020 17:28:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/extract-last-record-from-Quarter-and-add-it-to-another-variable/m-p/705130#M216236</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2020-12-10T17:28:46Z</dc:date>
    </item>
    <item>
      <title>Re: extract last record from Quarter and add it to another variable to find sum</title>
      <link>https://communities.sas.com/t5/SAS-Programming/extract-last-record-from-Quarter-and-add-it-to-another-variable/m-p/705131#M216237</link>
      <description>&lt;P&gt;The first issue I see here is that you hide data (dates) in structure (variable names), which makes coding for this complicated.&lt;/P&gt;
&lt;P&gt;Please supply a more complete example of your data, and show us how your intended value x is built from the start.&lt;/P&gt;</description>
      <pubDate>Thu, 10 Dec 2020 17:29:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/extract-last-record-from-Quarter-and-add-it-to-another-variable/m-p/705131#M216237</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-12-10T17:29:17Z</dc:date>
    </item>
    <item>
      <title>Re: extract last record from Quarter and add it to another variable to find sum</title>
      <link>https://communities.sas.com/t5/SAS-Programming/extract-last-record-from-Quarter-and-add-it-to-another-variable/m-p/705132#M216238</link>
      <description>&lt;P&gt;everytime Quarter and year changes in Excel, i have to pickup the latest one..&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;if i give %let Q=Q320, then i have to pickup last record in that column and add it to another variable..instance X=18456.35..&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 10 Dec 2020 17:31:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/extract-last-record-from-Quarter-and-add-it-to-another-variable/m-p/705132#M216238</guid>
      <dc:creator>Cho8</dc:creator>
      <dc:date>2020-12-10T17:31:35Z</dc:date>
    </item>
    <item>
      <title>Re: extract last record from Quarter and add it to another variable to find sum</title>
      <link>https://communities.sas.com/t5/SAS-Programming/extract-last-record-from-Quarter-and-add-it-to-another-variable/m-p/705141#M216243</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/354671"&gt;@Cho8&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;everytime Quarter and year changes in Excel, i have to pickup the latest one..&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;if i give %let Q=Q320, then i have to pickup last record in that column and add it to another variable..instance X=18456.35..&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Show us a more complete data set, where we can see what you are talking about. Provide the data in a suitable form, which is &lt;A href="https://blogs.sas.com/content/sastraining/2016/03/11/jedi-sas-tricks-data-to-data-step-macro/" target="_self"&gt;this&lt;/A&gt;, and not screen captures or Excel documents.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And once we can see what you are talking about, explain the whole thing in detail so we can understand what you mean.&lt;/P&gt;</description>
      <pubDate>Thu, 10 Dec 2020 17:41:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/extract-last-record-from-Quarter-and-add-it-to-another-variable/m-p/705141#M216243</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2020-12-10T17:41:01Z</dc:date>
    </item>
    <item>
      <title>Re: extract last record from Quarter and add it to another variable to find sum</title>
      <link>https://communities.sas.com/t5/SAS-Programming/extract-last-record-from-Quarter-and-add-it-to-another-variable/m-p/705142#M216244</link>
      <description>&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;X&lt;/TD&gt;&lt;TD&gt;Y&lt;/TD&gt;&lt;TD&gt;Q320&lt;/TD&gt;&lt;TD&gt;Q420&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;59.7006504&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;49.7784597&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;TD&gt;6103.478&lt;/TD&gt;&lt;TD&gt;6733.755&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt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gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;STRONG&gt;363.253294&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;0&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;112.9771&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;126.4904&lt;/STRONG&gt;&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;The last records of every column to be added.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Quarter and year are changing everytime(for every input spreadsheet,but not x,y).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For instance %let Q1=Q320,Q2=Q420&lt;/P&gt;</description>
      <pubDate>Thu, 10 Dec 2020 17:42:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/extract-last-record-from-Quarter-and-add-it-to-another-variable/m-p/705142#M216244</guid>
      <dc:creator>Cho8</dc:creator>
      <dc:date>2020-12-10T17:42:19Z</dc:date>
    </item>
    <item>
      <title>Re: extract last record from Quarter and add it to another variable to find sum</title>
      <link>https://communities.sas.com/t5/SAS-Programming/extract-last-record-from-Quarter-and-add-it-to-another-variable/m-p/705164#M216256</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/354671"&gt;@Cho8&lt;/a&gt;&amp;nbsp;, the best way to get help on this matter is to provide us the data in the desired form, rather than ignoring the request. I specifically stated what that was.&lt;/P&gt;</description>
      <pubDate>Thu, 10 Dec 2020 18:29:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/extract-last-record-from-Quarter-and-add-it-to-another-variable/m-p/705164#M216256</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2020-12-10T18:29:12Z</dc:date>
    </item>
  </channel>
</rss>

