<?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: Creating a variable substracting 2 variables in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Creating-a-variable-substracting-2-variables/m-p/98940#M290741</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok let me simplify what I am coming accross right now. I have 2 data sets right now, one has "amount1" and the other "amount2". Both are formatted as numeric and I am looknig for the format to subtract 1 from 2. I thought I knew what it is, but I am not receiving any results. What am I doing wrong?&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.JPG" class="jive-image" src="https://communities.sas.com/legacyfs/online/4293_Capture.JPG" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 02 Oct 2013 17:12:59 GMT</pubDate>
    <dc:creator>MalcolmCICWF</dc:creator>
    <dc:date>2013-10-02T17:12:59Z</dc:date>
    <item>
      <title>Creating a variable substracting 2 variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Creating-a-variable-substracting-2-variables/m-p/98937#M290738</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am trying to create a field called Varience that is Actual Payments minus Original Forecast (Trantype). All of my numbers below are made up of a transaction 'amount' with a 'trandate'. I am trying to use my existing data sets to pull in all the Actual Payments, another data set with Original Forecast, then a dataset where I try to create the 'Trantype' of Variance, subtracting a.amount from b.amount. &lt;IMG alt="Capture.JPG" class="jive-image-thumbnail jive-image" height="135" src="https://communities.sas.com/legacyfs/online/4268_Capture.JPG" width="743" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Below is an example of what I am trying to do for code. My data is working with the seperate data sets, but when I join and plave into my Qlikview report, I am not getting the results I want. The trantype is not ending up as "Variance".&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Untitled.jpg" class="jive-image-thumbnail jive-image" height="823" src="https://communities.sas.com/legacyfs/online/4269_Untitled.jpg" width="593" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Sep 2013 20:34:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Creating-a-variable-substracting-2-variables/m-p/98937#M290738</guid>
      <dc:creator>MalcolmCICWF</dc:creator>
      <dc:date>2013-09-30T20:34:01Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a variable substracting 2 variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Creating-a-variable-substracting-2-variables/m-p/98938#M290739</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The code looks correct to me, so its changing somewhere else. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't know what you mean by this though:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __jive_macro_name="quote" class="jive_text_macro jive_macro_quote"&gt;
&lt;P&gt;"but when I join and plave into my Qlikview report"&lt;/P&gt;
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Sep 2013 22:35:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Creating-a-variable-substracting-2-variables/m-p/98938#M290739</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2013-09-30T22:35:59Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a variable substracting 2 variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Creating-a-variable-substracting-2-variables/m-p/98939#M290740</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Are you getting a message in the log about variable trantype already in the data set? You have 3 versions, one from each input set a and b and the one you create with "as". A quick test with small data sets makes me bet you are getting the trantype as 'ActualPayments'. Drop the trantype from the two input sets and retry.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Sep 2013 22:49:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Creating-a-variable-substracting-2-variables/m-p/98939#M290740</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2013-09-30T22:49:27Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a variable substracting 2 variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Creating-a-variable-substracting-2-variables/m-p/98940#M290741</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok let me simplify what I am coming accross right now. I have 2 data sets right now, one has "amount1" and the other "amount2". Both are formatted as numeric and I am looknig for the format to subtract 1 from 2. I thought I knew what it is, but I am not receiving any results. What am I doing wrong?&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.JPG" class="jive-image" src="https://communities.sas.com/legacyfs/online/4293_Capture.JPG" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Oct 2013 17:12:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Creating-a-variable-substracting-2-variables/m-p/98940#M290741</guid>
      <dc:creator>MalcolmCICWF</dc:creator>
      <dc:date>2013-10-02T17:12:59Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a variable substracting 2 variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Creating-a-variable-substracting-2-variables/m-p/98941#M290742</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry in the example it shows I am adding, but this was just a test to see if even that worked.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Oct 2013 17:13:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Creating-a-variable-substracting-2-variables/m-p/98941#M290742</guid>
      <dc:creator>MalcolmCICWF</dc:creator>
      <dc:date>2013-10-02T17:13:53Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a variable substracting 2 variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Creating-a-variable-substracting-2-variables/m-p/98942#M290743</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you should use "merge" instead of "set".&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Oct 2013 18:45:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Creating-a-variable-substracting-2-variables/m-p/98942#M290743</guid>
      <dc:creator>Linlin</dc:creator>
      <dc:date>2013-10-02T18:45:53Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a variable substracting 2 variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Creating-a-variable-substracting-2-variables/m-p/98943#M290744</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Linilin, I was just experimenting with this when I saw your reply. It looks like I am getting the results I want now.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Oct 2013 21:10:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Creating-a-variable-substracting-2-variables/m-p/98943#M290744</guid>
      <dc:creator>MalcolmCICWF</dc:creator>
      <dc:date>2013-10-02T21:10:34Z</dc:date>
    </item>
  </channel>
</rss>

