<?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: Subtract values of same variable? in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Subtract-values-of-same-variable/m-p/104904#M9165</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can try something like this as suggested by data_null_&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data have;&lt;/P&gt;&lt;P&gt;&amp;nbsp; input num;&lt;/P&gt;&lt;P&gt;&amp;nbsp; substract=dif(num);&lt;/P&gt;&lt;P&gt;datalines;&lt;/P&gt;&lt;P&gt;1&lt;/P&gt;&lt;P&gt;2&lt;/P&gt;&lt;P&gt;3&lt;/P&gt;&lt;P&gt;4&lt;/P&gt;&lt;P&gt;5&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Jagadish&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 11 Apr 2013 02:58:52 GMT</pubDate>
    <dc:creator>Jagadishkatam</dc:creator>
    <dc:date>2013-04-11T02:58:52Z</dc:date>
    <item>
      <title>Subtract values of same variable?</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Subtract-values-of-same-variable/m-p/104902#M9163</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is there a way to subtract one value of a variable (column) from another value of the same variable? &lt;/P&gt;&lt;P&gt;For instance, I have a single column of numeric values:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1&lt;/P&gt;&lt;P&gt;2&lt;/P&gt;&lt;P&gt;3&lt;/P&gt;&lt;P&gt;4&lt;/P&gt;&lt;P&gt;5&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and I want to subtract the first value in the column from the second (i.e. 2-1), the second value from the third, etc.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Apr 2013 22:18:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Subtract-values-of-same-variable/m-p/104902#M9163</guid>
      <dc:creator>mdesessa</dc:creator>
      <dc:date>2013-04-10T22:18:22Z</dc:date>
    </item>
    <item>
      <title>Re: Subtract values of same variable?</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Subtract-values-of-same-variable/m-p/104903#M9164</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Look in the online documentation for the DIF function.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Apr 2013 22:37:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Subtract-values-of-same-variable/m-p/104903#M9164</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2013-04-10T22:37:23Z</dc:date>
    </item>
    <item>
      <title>Re: Subtract values of same variable?</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Subtract-values-of-same-variable/m-p/104904#M9165</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can try something like this as suggested by data_null_&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data have;&lt;/P&gt;&lt;P&gt;&amp;nbsp; input num;&lt;/P&gt;&lt;P&gt;&amp;nbsp; substract=dif(num);&lt;/P&gt;&lt;P&gt;datalines;&lt;/P&gt;&lt;P&gt;1&lt;/P&gt;&lt;P&gt;2&lt;/P&gt;&lt;P&gt;3&lt;/P&gt;&lt;P&gt;4&lt;/P&gt;&lt;P&gt;5&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Jagadish&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Apr 2013 02:58:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Subtract-values-of-same-variable/m-p/104904#M9165</guid>
      <dc:creator>Jagadishkatam</dc:creator>
      <dc:date>2013-04-11T02:58:52Z</dc:date>
    </item>
  </channel>
</rss>

