<?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: Finding Previous Year Values in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Finding-Previous-Year-Values/m-p/706459#M37887</link>
    <description>&lt;P&gt;Did&amp;nbsp; prevyear_value = Lag12 (year_value) ; not work? If not show the code you used from the log and describe what is incorrect.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you are hiding some sort of "group", such as company, that needs to reset then you need to include that information in your description and better instead of picture, that we can't code with, provide some example data in the form of a data step. You only need to provide the relevant variables and dummy data is fine as long as it behaves like your actual data.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Instructions here: &lt;A href="https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-data-AKA-generate/ta-p/258712" target="_blank"&gt;https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-data-AKA-generate/ta-p/258712&lt;/A&gt; will show how to turn an existing SAS data set into data step code that can be pasted into a forum code box using the &amp;lt;/&amp;gt; icon or attached as text to show exactly what you have and that we can test code against.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 16 Dec 2020 21:30:07 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2020-12-16T21:30:07Z</dc:date>
    <item>
      <title>Finding Previous Year Values</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Finding-Previous-Year-Values/m-p/706446#M37885</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;Below is a screenshot of my data. I am having trouble on how to create a column with Previous Year values. As you can see I need the 2016 year value to be in 2017's previous year column. I have tried multiple versions of retain and lag, but I'm not getting what I need still. Any help would be great!&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="kathleen_07_1-1608151885553.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/52706iC9D751DE07B538B0/image-size/medium?v=v2&amp;amp;px=400" role="button" title="kathleen_07_1-1608151885553.png" alt="kathleen_07_1-1608151885553.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 16 Dec 2020 20:53:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Finding-Previous-Year-Values/m-p/706446#M37885</guid>
      <dc:creator>kathleen_07</dc:creator>
      <dc:date>2020-12-16T20:53:24Z</dc:date>
    </item>
    <item>
      <title>Re: Finding Previous Year Values</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Finding-Previous-Year-Values/m-p/706459#M37887</link>
      <description>&lt;P&gt;Did&amp;nbsp; prevyear_value = Lag12 (year_value) ; not work? If not show the code you used from the log and describe what is incorrect.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you are hiding some sort of "group", such as company, that needs to reset then you need to include that information in your description and better instead of picture, that we can't code with, provide some example data in the form of a data step. You only need to provide the relevant variables and dummy data is fine as long as it behaves like your actual data.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Instructions here: &lt;A href="https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-data-AKA-generate/ta-p/258712" target="_blank"&gt;https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-data-AKA-generate/ta-p/258712&lt;/A&gt; will show how to turn an existing SAS data set into data step code that can be pasted into a forum code box using the &amp;lt;/&amp;gt; icon or attached as text to show exactly what you have and that we can test code against.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 16 Dec 2020 21:30:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Finding-Previous-Year-Values/m-p/706459#M37887</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2020-12-16T21:30:07Z</dc:date>
    </item>
  </channel>
</rss>

