<?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: URGENT:2 Question: multiple conditions in if statement and want the results not shown in the tab in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/URGENT-2-Question-multiple-conditions-in-if-statement-and-want/m-p/562502#M157585</link>
    <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/274500"&gt;@Kayla_Tan222&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;- Use a DROP statement for any variable that you don't need in your output data set (the one in the DATA statement).&lt;/P&gt;
&lt;P&gt;- You can't mix SAS data step and SAS macro language (the %LET statement)&lt;/P&gt;
&lt;P&gt;- Try and use your year and month variables to create&amp;nbsp; SAS Date values. This would make it MUCH easier to calculate these year differences.&lt;/P&gt;
&lt;P&gt;For your FY vars this would look like:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;acc_date=mdy(accmth_fy,1,accyr_fy);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Do you also have a loss month variable? Or could we just use a date beginning of the year?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For the logic you're trying to implement: Is the difference just year boundaries or should it be an actual full year difference?&lt;/P&gt;</description>
    <pubDate>Thu, 30 May 2019 09:41:30 GMT</pubDate>
    <dc:creator>Patrick</dc:creator>
    <dc:date>2019-05-30T09:41:30Z</dc:date>
    <item>
      <title>URGENT:2 Question: multiple conditions in if statement and want the results not shown in the table</title>
      <link>https://communities.sas.com/t5/SAS-Programming/URGENT-2-Question-multiple-conditions-in-if-statement-and-want/m-p/562486#M157571</link>
      <description>&lt;P&gt;Hi, how can I do with my code if I want multiple conditions in my if statement. For Ex,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;if&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; accyr_fy=&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;2019&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;and&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; accmth_fy&amp;lt;=&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;12&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;and&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; lossyr_fy=&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;2019&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt;-&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;0&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;or&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; accyr_fy&amp;lt;&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;2019&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;and&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; lossyr_fy=&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;2019&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt;-&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;0&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;then&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;%let&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; Yearcount=&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;0&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;else&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;if&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; accyr_fy=&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;2019&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;and&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; accmth_fy&amp;lt;=&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;12&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;and&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; lossyr_fy=&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;2019&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt;-&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;1&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;or&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; accyr_fy&amp;lt;&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;2019&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;and&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; lossyr_fy=&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;2019&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt;-&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;1&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;then&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;%let&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; Yearcount=&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;1&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;else&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;if&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; accyr_fy=&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;2019&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;and&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; accmth_fy&amp;lt;=&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;12&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;and&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; lossyr_fy=&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;2019&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt;-&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;2&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;or&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; accyr_fy&amp;lt;&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;2019&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;and&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; lossyr_fy=&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;2019&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt;-&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;2&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;then&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;%let&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; Yearcount=&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;2&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;......&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;else &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;if&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; accyr_fy=&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;2019&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;and&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; accmth_fy&amp;lt;=&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;12&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;and&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; lossyr_fy=&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;2019&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt;-&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;9&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;or&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; accyr_fy&amp;lt;&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;2019&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;and&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; lossyr_fy=&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;2019&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt;-&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;9&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;then&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;%let&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; Yearcount=&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;9&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;else&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; accyr_fy=&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;2019&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;and&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; accmth_fy&amp;lt;=&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;12&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;and&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; lossyr_fy=&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;2019&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt;-&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;10&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;or&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; accyr_fy&amp;lt;&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;2019&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;and&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; lossyr_fy=&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;2019&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt;-&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;10&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;then&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;%let&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; Yearcount=&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;10&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, this is not work, I don't no whether is because there is a lot of &lt;STRONG&gt;'and'&lt;/STRONG&gt; or &lt;STRONG&gt;'else if' &lt;/STRONG&gt;ot&amp;nbsp; the way I write is totally wrong.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Besides,&lt;/P&gt;&lt;P&gt;I put %let &lt;FONT face="Courier New" size="3"&gt;Yearcount&lt;/FONT&gt;=number is because I don't want&amp;nbsp;the Yearcount to be shown in my table. I want to do something with the Yearcount later. I don't no whether this is wrong or correct also. or there is another way to do so?&lt;/P&gt;</description>
      <pubDate>Thu, 30 May 2019 08:48:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/URGENT-2-Question-multiple-conditions-in-if-statement-and-want/m-p/562486#M157571</guid>
      <dc:creator>Kayla_Tan222</dc:creator>
      <dc:date>2019-05-30T08:48:26Z</dc:date>
    </item>
    <item>
      <title>Re: URGENT:2 Question: multiple conditions in if statement and want the results not shown in the tab</title>
      <link>https://communities.sas.com/t5/SAS-Programming/URGENT-2-Question-multiple-conditions-in-if-statement-and-want/m-p/562495#M157579</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Part of the problem is the structuring of the if clauses.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT size="3" face="Courier New" color="#0000ff"&gt;if&lt;/FONT&gt;&lt;FONT size="3" face="Courier New"&gt; accyr_fy=&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT size="3" face="Courier New" color="#008080"&gt;2019&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT size="3" face="Courier New" color="#0000ff"&gt;and&lt;/FONT&gt;&lt;FONT size="3" face="Courier New"&gt; accmth_fy&amp;lt;=&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT size="3" face="Courier New" color="#008080"&gt;12&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT size="3" face="Courier New" color="#0000ff"&gt;and&lt;/FONT&gt;&lt;FONT size="3" face="Courier New"&gt; lossyr_fy=&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT size="3" face="Courier New" color="#008080"&gt;2019&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT size="3" face="Courier New"&gt;-&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT size="3" face="Courier New" color="#008080"&gt;0&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT size="3" face="Courier New" color="#0000ff"&gt;or&lt;/FONT&gt;&lt;FONT size="3" face="Courier New"&gt; accyr_fy=&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT size="3" face="Courier New" color="#008080"&gt;2019&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT size="3" face="Courier New" color="#0000ff"&gt;and&lt;/FONT&gt;&lt;FONT size="3" face="Courier New"&gt; lossyr_fy=&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT size="3" face="Courier New" color="#008080"&gt;2019&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT size="3" face="Courier New"&gt;-&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT size="3" face="Courier New" color="#008080"&gt;0&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="3" face="Courier New" color="#0000ff"&gt;then&lt;/FONT&gt; &lt;FONT size="3" face="Courier New" color="#0000ff"&gt;%let&lt;/FONT&gt;&lt;FONT size="3" face="Courier New"&gt; Yearcount=&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT size="3" face="Courier New" color="#008080"&gt;0&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT size="3" face="Courier New"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT size="3" face="Courier New"&gt;should really be rewritten as&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT size="3" face="Courier New" color="#0000ff"&gt;if&lt;/FONT&gt;&lt;FONT size="3" face="Courier New"&gt; (accyr_fy=&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT size="3" face="Courier New" color="#008080"&gt;2019&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT size="3" face="Courier New" color="#0000ff"&gt;and&lt;/FONT&gt;&lt;FONT size="3" face="Courier New"&gt; accmth_fy&amp;lt;=&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT size="3" face="Courier New" color="#008080"&gt;12&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT size="3" face="Courier New" color="#0000ff"&gt;and&lt;/FONT&gt;&lt;FONT size="3" face="Courier New"&gt; lossyr_fy=&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT size="3" face="Courier New" color="#008080"&gt;2019&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT size="3" face="Courier New"&gt;-&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT size="3" face="Courier New" color="#008080"&gt;0)&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT size="3" face="Courier New" color="#0000ff"&gt;or&lt;/FONT&gt;&lt;FONT size="3" face="Courier New"&gt; (accyr_fy=&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT size="3" face="Courier New" color="#008080"&gt;2019&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT size="3" face="Courier New" color="#0000ff"&gt;and&lt;/FONT&gt;&lt;FONT size="3" face="Courier New"&gt; lossyr_fy=&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT size="3" face="Courier New" color="#008080"&gt;2019&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT size="3" face="Courier New"&gt;-&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT size="3" face="Courier New" color="#008080"&gt;0)&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="3" face="Courier New" color="#0000ff"&gt;then&lt;/FONT&gt; &lt;FONT size="3" face="Courier New" color="#0000ff"&gt;%let&lt;/FONT&gt;&lt;FONT size="3" face="Courier New"&gt; Yearcount=&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT size="3" face="Courier New" color="#008080"&gt;0&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT size="3" face="Courier New"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT size="3" face="Courier New"&gt;using parentheses. This may not be programatically necessary in every case but it also makes it much easier to read and debug when you can locate 'sections' in each clause. However there is a further problem here where the part after the 'or' effectively overrules the part before. Any obersavtions that satisfy &lt;STRONG&gt;&lt;FONT size="3" face="Courier New" color="#0000ff"&gt;(if&lt;/FONT&gt; accyr_fy=&lt;FONT size="3" face="Courier New" color="#008080"&gt;2019&lt;/FONT&gt; &lt;FONT size="3" face="Courier New" color="#0000ff"&gt;and&lt;/FONT&gt; accmth_fy&amp;lt;=&lt;FONT size="3" face="Courier New" color="#008080"&gt;12&lt;/FONT&gt; &lt;FONT size="3" face="Courier New" color="#0000ff"&gt;and&lt;/FONT&gt; lossyr_fy=&lt;FONT size="3" face="Courier New" color="#008080"&gt;2019&lt;/FONT&gt;-&lt;FONT size="3" face="Courier New" color="#008080"&gt;0)&lt;/FONT&gt;&lt;/STRONG&gt; will also automatically satisfy &lt;STRONG&gt;(accyr_fy=&lt;FONT size="3" face="Courier New" color="#008080"&gt;2019&lt;/FONT&gt; &lt;FONT size="3" face="Courier New" color="#0000ff"&gt;and&lt;/FONT&gt; lossyr_fy=&lt;FONT size="3" face="Courier New" color="#008080"&gt;2019&lt;/FONT&gt;-&lt;FONT size="3" face="Courier New" color="#008080"&gt;0)&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT size="3" face="Courier New" color="#008080"&gt;. &lt;FONT color="#000000"&gt;So this whole statement effectively is the same as saying. &lt;/FONT&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT size="3" face="Courier New" color="#0000ff"&gt;if&lt;/FONT&gt; &lt;FONT size="3" face="Courier New"&gt;accyr_fy=&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT size="3" face="Courier New" color="#008080"&gt;2019&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT size="3" face="Courier New" color="#0000ff"&gt;and&lt;/FONT&gt;&lt;FONT size="3" face="Courier New"&gt; lossyr_fy=&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT size="3" face="Courier New" color="#008080"&gt;2019&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT size="3" face="Courier New"&gt;-&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT size="3" face="Courier New" color="#008080"&gt;0&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="3" face="Courier New" color="#0000ff"&gt;then&lt;/FONT&gt; &lt;FONT size="3" face="Courier New" color="#0000ff"&gt;%let&lt;/FONT&gt;&lt;FONT size="3" face="Courier New"&gt; Yearcount=&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT size="3" face="Courier New" color="#008080"&gt;0&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT size="3" face="Courier New"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 30 May 2019 08:55:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/URGENT-2-Question-multiple-conditions-in-if-statement-and-want/m-p/562495#M157579</guid>
      <dc:creator>33pedro</dc:creator>
      <dc:date>2019-05-30T08:55:00Z</dc:date>
    </item>
    <item>
      <title>Re: URGENT:2 Question: multiple conditions in if statement and want the results not shown in the tab</title>
      <link>https://communities.sas.com/t5/SAS-Programming/URGENT-2-Question-multiple-conditions-in-if-statement-and-want/m-p/562497#M157580</link>
      <description>&lt;P&gt;Hi 33pedro,&lt;/P&gt;&lt;P&gt;First of all thanks for your reply.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I found that the error occur is because of the %let statement.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;do you know the way to hide the &lt;STRONG&gt;yr&lt;/STRONG&gt; variable? I dunwan it to be show in my table but then I needed it to do some calculation afterwards.&lt;/P&gt;</description>
      <pubDate>Thu, 30 May 2019 09:14:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/URGENT-2-Question-multiple-conditions-in-if-statement-and-want/m-p/562497#M157580</guid>
      <dc:creator>Kayla_Tan222</dc:creator>
      <dc:date>2019-05-30T09:14:45Z</dc:date>
    </item>
    <item>
      <title>Re: URGENT:2 Question: multiple conditions in if statement and want the results not shown in the tab</title>
      <link>https://communities.sas.com/t5/SAS-Programming/URGENT-2-Question-multiple-conditions-in-if-statement-and-want/m-p/562498#M157581</link>
      <description>&lt;P&gt;I am not too sure about better ways to deal with the Yearcount macro variable but I also would say that you are assigning new values to the same macro variable each time. Someone else may be better placed to advise on this though&lt;/P&gt;</description>
      <pubDate>Thu, 30 May 2019 09:19:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/URGENT-2-Question-multiple-conditions-in-if-statement-and-want/m-p/562498#M157581</guid>
      <dc:creator>33pedro</dc:creator>
      <dc:date>2019-05-30T09:19:01Z</dc:date>
    </item>
    <item>
      <title>Re: URGENT:2 Question: multiple conditions in if statement and want the results not shown in the tab</title>
      <link>https://communities.sas.com/t5/SAS-Programming/URGENT-2-Question-multiple-conditions-in-if-statement-and-want/m-p/562502#M157585</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/274500"&gt;@Kayla_Tan222&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;- Use a DROP statement for any variable that you don't need in your output data set (the one in the DATA statement).&lt;/P&gt;
&lt;P&gt;- You can't mix SAS data step and SAS macro language (the %LET statement)&lt;/P&gt;
&lt;P&gt;- Try and use your year and month variables to create&amp;nbsp; SAS Date values. This would make it MUCH easier to calculate these year differences.&lt;/P&gt;
&lt;P&gt;For your FY vars this would look like:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;acc_date=mdy(accmth_fy,1,accyr_fy);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Do you also have a loss month variable? Or could we just use a date beginning of the year?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For the logic you're trying to implement: Is the difference just year boundaries or should it be an actual full year difference?&lt;/P&gt;</description>
      <pubDate>Thu, 30 May 2019 09:41:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/URGENT-2-Question-multiple-conditions-in-if-statement-and-want/m-p/562502#M157585</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2019-05-30T09:41:30Z</dc:date>
    </item>
    <item>
      <title>Re: URGENT:2 Question: multiple conditions in if statement and want the results not shown in the tab</title>
      <link>https://communities.sas.com/t5/SAS-Programming/URGENT-2-Question-multiple-conditions-in-if-statement-and-want/m-p/562504#M157587</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/275142"&gt;@33pedro&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;"&lt;EM&gt;that you are assigning new values to the same macro variable each time&lt;/EM&gt;"&lt;/P&gt;
&lt;P&gt;It's actually even worse: SAS Macro code executes before the data step. So you can't have a %LET statement in a SAS data step IF condition (that throws a syntax error). But even if you could: The %LET statement would execute before the data step and though the value of the macro variable would be set to the last assignment of it (the last %let statement).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You need to use CALL SYMPUT() to write a value from a SAS data step to macro level. You then can only use the value of this macro variable AFTER the data step finished (=only after the RUN; )&lt;/P&gt;</description>
      <pubDate>Thu, 30 May 2019 09:42:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/URGENT-2-Question-multiple-conditions-in-if-statement-and-want/m-p/562504#M157587</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2019-05-30T09:42:00Z</dc:date>
    </item>
    <item>
      <title>Re: URGENT:2 Question: multiple conditions in if statement and want the results not shown in the tab</title>
      <link>https://communities.sas.com/t5/SAS-Programming/URGENT-2-Question-multiple-conditions-in-if-statement-and-want/m-p/562582#M157611</link>
      <description>&lt;P&gt;This is not correct either, or at least I highly suspect it won't give you what you need.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;lossyr_fy=2019-0 &lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;You either need to wrap that in quotes because it's a character variable or determine what the underlying value is and use that.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/274500"&gt;@Kayla_Tan222&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hi, how can I do with my code if I want multiple conditions in my if statement. For Ex,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;if&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; accyr_fy=&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT face="Courier New" size="3" color="#008080"&gt;2019&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT face="Courier New" size="3" color="#0000ff"&gt;and&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; accmth_fy&amp;lt;=&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT face="Courier New" size="3" color="#008080"&gt;12&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT face="Courier New" size="3" color="#0000ff"&gt;and&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; lossyr_fy=&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT face="Courier New" size="3" color="#008080"&gt;2019&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt;-&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT face="Courier New" size="3" color="#008080"&gt;0&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT face="Courier New" size="3" color="#0000ff"&gt;or&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; accyr_fy&amp;lt;&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT face="Courier New" size="3" color="#008080"&gt;2019&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT face="Courier New" size="3" color="#0000ff"&gt;and&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; lossyr_fy=&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT face="Courier New" size="3" color="#008080"&gt;2019&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt;-&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT face="Courier New" size="3" color="#008080"&gt;0&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;then&lt;/FONT&gt; &lt;FONT face="Courier New" size="3" color="#0000ff"&gt;%let&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; Yearcount=&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT face="Courier New" size="3" color="#008080"&gt;0&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;else&lt;/FONT&gt; &lt;FONT face="Courier New" size="3" color="#0000ff"&gt;if&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; accyr_fy=&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT face="Courier New" size="3" color="#008080"&gt;2019&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT face="Courier New" size="3" color="#0000ff"&gt;and&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; accmth_fy&amp;lt;=&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT face="Courier New" size="3" color="#008080"&gt;12&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT face="Courier New" size="3" color="#0000ff"&gt;and&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; lossyr_fy=&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT face="Courier New" size="3" color="#008080"&gt;2019&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt;-&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT face="Courier New" size="3" color="#008080"&gt;1&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT face="Courier New" size="3" color="#0000ff"&gt;or&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; accyr_fy&amp;lt;&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT face="Courier New" size="3" color="#008080"&gt;2019&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT face="Courier New" size="3" color="#0000ff"&gt;and&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; lossyr_fy=&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT face="Courier New" size="3" color="#008080"&gt;2019&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt;-&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT face="Courier New" size="3" color="#008080"&gt;1&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;then&lt;/FONT&gt; &lt;FONT face="Courier New" size="3" color="#0000ff"&gt;%let&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; Yearcount=&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT face="Courier New" size="3" color="#008080"&gt;1&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;else&lt;/FONT&gt; &lt;FONT face="Courier New" size="3" color="#0000ff"&gt;if&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; accyr_fy=&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT face="Courier New" size="3" color="#008080"&gt;2019&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT face="Courier New" size="3" color="#0000ff"&gt;and&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; accmth_fy&amp;lt;=&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT face="Courier New" size="3" color="#008080"&gt;12&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT face="Courier New" size="3" color="#0000ff"&gt;and&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; lossyr_fy=&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT face="Courier New" size="3" color="#008080"&gt;2019&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt;-&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT face="Courier New" size="3" color="#008080"&gt;2&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT face="Courier New" size="3" color="#0000ff"&gt;or&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; accyr_fy&amp;lt;&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT face="Courier New" size="3" color="#008080"&gt;2019&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT face="Courier New" size="3" color="#0000ff"&gt;and&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; lossyr_fy=&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT face="Courier New" size="3" color="#008080"&gt;2019&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt;-&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT face="Courier New" size="3" color="#008080"&gt;2&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;then&lt;/FONT&gt; &lt;FONT face="Courier New" size="3" color="#0000ff"&gt;%let&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; Yearcount=&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT face="Courier New" size="3" color="#008080"&gt;2&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;......&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;else &lt;/FONT&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;if&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; accyr_fy=&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT face="Courier New" size="3" color="#008080"&gt;2019&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT face="Courier New" size="3" color="#0000ff"&gt;and&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; accmth_fy&amp;lt;=&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT face="Courier New" size="3" color="#008080"&gt;12&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT face="Courier New" size="3" color="#0000ff"&gt;and&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; lossyr_fy=&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT face="Courier New" size="3" color="#008080"&gt;2019&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt;-&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT face="Courier New" size="3" color="#008080"&gt;9&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT face="Courier New" size="3" color="#0000ff"&gt;or&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; accyr_fy&amp;lt;&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT face="Courier New" size="3" color="#008080"&gt;2019&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT face="Courier New" size="3" color="#0000ff"&gt;and&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; lossyr_fy=&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT face="Courier New" size="3" color="#008080"&gt;2019&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt;-&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT face="Courier New" size="3" color="#008080"&gt;9&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;then&lt;/FONT&gt; &lt;FONT face="Courier New" size="3" color="#0000ff"&gt;%let&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; Yearcount=&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT face="Courier New" size="3" color="#008080"&gt;9&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;else&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; accyr_fy=&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT face="Courier New" size="3" color="#008080"&gt;2019&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT face="Courier New" size="3" color="#0000ff"&gt;and&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; accmth_fy&amp;lt;=&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT face="Courier New" size="3" color="#008080"&gt;12&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT face="Courier New" size="3" color="#0000ff"&gt;and&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; lossyr_fy=&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT face="Courier New" size="3" color="#008080"&gt;2019&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt;-&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT face="Courier New" size="3" color="#008080"&gt;10&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT face="Courier New" size="3" color="#0000ff"&gt;or&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; accyr_fy&amp;lt;&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT face="Courier New" size="3" color="#008080"&gt;2019&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT face="Courier New" size="3" color="#0000ff"&gt;and&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; lossyr_fy=&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT face="Courier New" size="3" color="#008080"&gt;2019&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt;-&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT face="Courier New" size="3" color="#008080"&gt;10&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;then&lt;/FONT&gt; &lt;FONT face="Courier New" size="3" color="#0000ff"&gt;%let&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; Yearcount=&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT face="Courier New" size="3" color="#008080"&gt;10&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;However, this is not work, I don't no whether is because there is a lot of &lt;STRONG&gt;'and'&lt;/STRONG&gt; or &lt;STRONG&gt;'else if' &lt;/STRONG&gt;ot&amp;nbsp; the way I write is totally wrong.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Besides,&lt;/P&gt;
&lt;P&gt;I put %let &lt;FONT face="Courier New" size="3"&gt;Yearcount&lt;/FONT&gt;=number is because I don't want&amp;nbsp;the Yearcount to be shown in my table. I want to do something with the Yearcount later. I don't no whether this is wrong or correct also. or there is another way to do so?&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 30 May 2019 14:46:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/URGENT-2-Question-multiple-conditions-in-if-statement-and-want/m-p/562582#M157611</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-05-30T14:46:28Z</dc:date>
    </item>
    <item>
      <title>Re: URGENT:2 Question: multiple conditions in if statement and want the results not shown in the tab</title>
      <link>https://communities.sas.com/t5/SAS-Programming/URGENT-2-Question-multiple-conditions-in-if-statement-and-want/m-p/562586#M157612</link>
      <description>&lt;P&gt;Please provide a little more context.&amp;nbsp; In addition to the mixed up logic of the IF conditions you have mixed macro code (%LET) with data step code (IF).&amp;nbsp; Provide sample input and expected output data for the example input.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Why do you think you need a macro variable?&amp;nbsp; What code are you going to use the macro variable to generate?&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 30 May 2019 14:55:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/URGENT-2-Question-multiple-conditions-in-if-statement-and-want/m-p/562586#M157612</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2019-05-30T14:55:54Z</dc:date>
    </item>
  </channel>
</rss>

