<?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 Difference between using If versus where in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Difference-between-using-If-versus-where/m-p/847474#M335059</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I took the SAS 9.4 Base Certification practice exam.&amp;nbsp; Below are the steps for question 13.&lt;/P&gt;
&lt;P&gt;&lt;SPAN class=""&gt;This project will use data set&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN class=""&gt;cert.input36&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN class=""&gt;.&amp;nbsp;At any time, you may save your program as&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN class=""&gt;program36&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN class=""&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;in&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN class=""&gt;cert\programs&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN class=""&gt;.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class=""&gt;Write a SAS program that will clean the data in&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN class=""&gt;cert.input36&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN class=""&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;as follows:&lt;/SPAN&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;SPAN&gt;Step 1:&lt;/SPAN&gt;&lt;/LI&gt;
&lt;UL&gt;
&lt;LI&gt;create a temporary data set,&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;cleandata36&lt;/STRONG&gt;.&lt;/LI&gt;
&lt;LI&gt;In this data set, convert all&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;group&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;values to upper case.&lt;/LI&gt;
&lt;LI&gt;Then keep only observations with&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;group&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;equal to 'A' or 'B'.&lt;/LI&gt;
&lt;/UL&gt;
&lt;/UL&gt;
&lt;/UL&gt;
&lt;UL&gt;
&lt;UL&gt;
&lt;LI&gt;Step 2:&lt;/LI&gt;
&lt;UL&gt;
&lt;LI&gt;Determine the MEDIAN value for the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Kilograms&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;variable for each&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;group&lt;/STRONG&gt;&amp;nbsp;(A,B) in the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;cleandata36&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;data set. Round MEDIAN to the nearest whole number.&lt;/LI&gt;
&lt;/UL&gt;
&lt;/UL&gt;
&lt;/UL&gt;
&lt;UL&gt;
&lt;UL&gt;
&lt;LI&gt;Step 3:&lt;/LI&gt;
&lt;UL&gt;
&lt;LI&gt;create&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;results.output36&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;from&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;cleandata36&lt;/STRONG&gt;&lt;/LI&gt;
&lt;LI&gt;Ensure that all values for variable&amp;nbsp;&lt;STRONG&gt;Kilograms&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;are between 40 and 200, inclusively.&lt;/LI&gt;
&lt;LI&gt;If the value is missing or out of range, replace the value with the MEDIAN&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Kilograms&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;value for the respective&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;group&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;(A,B) calculated in step 2.&lt;/LI&gt;
&lt;/UL&gt;
&lt;/UL&gt;
&lt;/UL&gt;
&lt;P&gt;&lt;SPAN&gt;How many observations are in&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;results.output36&lt;/STRONG&gt;&lt;SPAN&gt;?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;The original dataset had 5000 observations.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;My answer was&amp;nbsp; &amp;nbsp;4897 observations.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;The practice exam has 4992 observations for the answer.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I can't figure out why there is a 95 observation difference&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I did answer the second question regarding the median correctly.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Thanks for your help.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I used the following code:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;&lt;FONT color="#003300"&gt;data cleandata36;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#003300"&gt;set cert.input36;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#003300"&gt;group = upcase(group);&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#003300"&gt;where group in ('A' 'B');&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#003300"&gt;run;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;&lt;FONT color="#003300"&gt;proc means data=cleandata36 median maxdec=0;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#003300"&gt;class group;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#003300"&gt;var kilograms;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#003300"&gt;run;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;&lt;FONT color="#003300"&gt;data results.output36;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#003300"&gt;set cleandata36;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#003300"&gt;if Group = 'A' and kilograms lt 40 or kilograms gt 200 then kilograms = 79;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#003300"&gt;if Group = 'B' and kilograms lt 40 or kilograms gt 200 then kilograms = 89; &lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#003300"&gt;run;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;&lt;BR /&gt;&lt;FONT color="#003300"&gt;proc means data=results.output36 maxdec= 2 min max mean median n;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#003300"&gt;class group;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#003300"&gt;var kilograms;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#003300"&gt;run;&lt;/FONT&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/PRE&gt;
&lt;PRE&gt;&lt;BR /&gt;The answer code is:&lt;BR /&gt;data work.cleandata36; &amp;nbsp;&lt;BR /&gt; set cert.input36; group=upcase(group); &lt;BR /&gt;if group in ('A','B');&lt;BR /&gt;run;&lt;/PRE&gt;
&lt;PRE id="yui_3_17_2_1_1670002093751_538"&gt;proc means data=work.cleandata36 median;
&amp;nbsp; class group;
&amp;nbsp; var kilograms;
run;

data results.output36;
&amp;nbsp; set cleandata36;
&amp;nbsp; if Kilograms &amp;lt; 40 or Kilograms &amp;gt; 200 then do;
&amp;nbsp; &amp;nbsp; if group='A' then kilograms=79;
&amp;nbsp; &amp;nbsp; else kilograms=89;
&amp;nbsp; end;
run;

proc contents data=results.output36;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 02 Dec 2022 17:54:24 GMT</pubDate>
    <dc:creator>abqdiane</dc:creator>
    <dc:date>2022-12-02T17:54:24Z</dc:date>
    <item>
      <title>Difference between using If versus where</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Difference-between-using-If-versus-where/m-p/847474#M335059</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I took the SAS 9.4 Base Certification practice exam.&amp;nbsp; Below are the steps for question 13.&lt;/P&gt;
&lt;P&gt;&lt;SPAN class=""&gt;This project will use data set&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN class=""&gt;cert.input36&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN class=""&gt;.&amp;nbsp;At any time, you may save your program as&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN class=""&gt;program36&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN class=""&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;in&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN class=""&gt;cert\programs&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN class=""&gt;.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class=""&gt;Write a SAS program that will clean the data in&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN class=""&gt;cert.input36&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN class=""&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;as follows:&lt;/SPAN&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;SPAN&gt;Step 1:&lt;/SPAN&gt;&lt;/LI&gt;
&lt;UL&gt;
&lt;LI&gt;create a temporary data set,&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;cleandata36&lt;/STRONG&gt;.&lt;/LI&gt;
&lt;LI&gt;In this data set, convert all&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;group&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;values to upper case.&lt;/LI&gt;
&lt;LI&gt;Then keep only observations with&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;group&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;equal to 'A' or 'B'.&lt;/LI&gt;
&lt;/UL&gt;
&lt;/UL&gt;
&lt;/UL&gt;
&lt;UL&gt;
&lt;UL&gt;
&lt;LI&gt;Step 2:&lt;/LI&gt;
&lt;UL&gt;
&lt;LI&gt;Determine the MEDIAN value for the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Kilograms&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;variable for each&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;group&lt;/STRONG&gt;&amp;nbsp;(A,B) in the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;cleandata36&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;data set. Round MEDIAN to the nearest whole number.&lt;/LI&gt;
&lt;/UL&gt;
&lt;/UL&gt;
&lt;/UL&gt;
&lt;UL&gt;
&lt;UL&gt;
&lt;LI&gt;Step 3:&lt;/LI&gt;
&lt;UL&gt;
&lt;LI&gt;create&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;results.output36&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;from&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;cleandata36&lt;/STRONG&gt;&lt;/LI&gt;
&lt;LI&gt;Ensure that all values for variable&amp;nbsp;&lt;STRONG&gt;Kilograms&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;are between 40 and 200, inclusively.&lt;/LI&gt;
&lt;LI&gt;If the value is missing or out of range, replace the value with the MEDIAN&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Kilograms&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;value for the respective&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;group&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;(A,B) calculated in step 2.&lt;/LI&gt;
&lt;/UL&gt;
&lt;/UL&gt;
&lt;/UL&gt;
&lt;P&gt;&lt;SPAN&gt;How many observations are in&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;results.output36&lt;/STRONG&gt;&lt;SPAN&gt;?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;The original dataset had 5000 observations.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;My answer was&amp;nbsp; &amp;nbsp;4897 observations.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;The practice exam has 4992 observations for the answer.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I can't figure out why there is a 95 observation difference&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I did answer the second question regarding the median correctly.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Thanks for your help.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I used the following code:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;&lt;FONT color="#003300"&gt;data cleandata36;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#003300"&gt;set cert.input36;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#003300"&gt;group = upcase(group);&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#003300"&gt;where group in ('A' 'B');&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#003300"&gt;run;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;&lt;FONT color="#003300"&gt;proc means data=cleandata36 median maxdec=0;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#003300"&gt;class group;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#003300"&gt;var kilograms;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#003300"&gt;run;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;&lt;FONT color="#003300"&gt;data results.output36;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#003300"&gt;set cleandata36;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#003300"&gt;if Group = 'A' and kilograms lt 40 or kilograms gt 200 then kilograms = 79;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#003300"&gt;if Group = 'B' and kilograms lt 40 or kilograms gt 200 then kilograms = 89; &lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#003300"&gt;run;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;&lt;BR /&gt;&lt;FONT color="#003300"&gt;proc means data=results.output36 maxdec= 2 min max mean median n;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#003300"&gt;class group;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#003300"&gt;var kilograms;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#003300"&gt;run;&lt;/FONT&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/PRE&gt;
&lt;PRE&gt;&lt;BR /&gt;The answer code is:&lt;BR /&gt;data work.cleandata36; &amp;nbsp;&lt;BR /&gt; set cert.input36; group=upcase(group); &lt;BR /&gt;if group in ('A','B');&lt;BR /&gt;run;&lt;/PRE&gt;
&lt;PRE id="yui_3_17_2_1_1670002093751_538"&gt;proc means data=work.cleandata36 median;
&amp;nbsp; class group;
&amp;nbsp; var kilograms;
run;

data results.output36;
&amp;nbsp; set cleandata36;
&amp;nbsp; if Kilograms &amp;lt; 40 or Kilograms &amp;gt; 200 then do;
&amp;nbsp; &amp;nbsp; if group='A' then kilograms=79;
&amp;nbsp; &amp;nbsp; else kilograms=89;
&amp;nbsp; end;
run;

proc contents data=results.output36;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 02 Dec 2022 17:54:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Difference-between-using-If-versus-where/m-p/847474#M335059</guid>
      <dc:creator>abqdiane</dc:creator>
      <dc:date>2022-12-02T17:54:24Z</dc:date>
    </item>
    <item>
      <title>Re: Difference between using If versus where</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Difference-between-using-If-versus-where/m-p/847476#M335061</link>
      <description>&lt;P&gt;Here is a small example of what the difference is:&lt;/P&gt;
&lt;PRE&gt;data example;
  input group $;
datalines;
a
A
b
B
;

data usewhere;
   set example;
   group=upcase(group);
   where group in ('A' 'B');
run;
data useif;
   set example;
   group=upcase(group);
   if group in ('A' 'B');
run;&lt;/PRE&gt;
&lt;P&gt;WHERE used the values from in input data set vector, the "upcase" is basically ignored at it would be applied after the selection.&lt;/P&gt;
&lt;P&gt;IF uses the values of the variable as encountered.&lt;/P&gt;
&lt;P&gt;So your code did not select the values of group from 'a' and 'b' that should be converted to 'A' and 'B' resulting in fewer observations.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 02 Dec 2022 18:10:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Difference-between-using-If-versus-where/m-p/847476#M335061</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2022-12-02T18:10:32Z</dc:date>
    </item>
    <item>
      <title>Re: Difference between using If versus where</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Difference-between-using-If-versus-where/m-p/847477#M335062</link>
      <description>&lt;P&gt;The difference is like the difference between the bouncer at the door of Studio 54 and host at a &lt;SPAN&gt;restaurant.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;The bouncer (the WHERE) prevents you from entering the building and the host (subsetting IF) prevents you from getting to a table.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 02 Dec 2022 18:25:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Difference-between-using-If-versus-where/m-p/847477#M335062</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2022-12-02T18:25:37Z</dc:date>
    </item>
    <item>
      <title>Re: Difference between using If versus where</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Difference-between-using-If-versus-where/m-p/847478#M335063</link>
      <description>&lt;P&gt;Thanks for the great explanation.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 02 Dec 2022 18:43:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Difference-between-using-If-versus-where/m-p/847478#M335063</guid>
      <dc:creator>abqdiane</dc:creator>
      <dc:date>2022-12-02T18:43:08Z</dc:date>
    </item>
    <item>
      <title>Re: Difference between using If versus where</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Difference-between-using-If-versus-where/m-p/847479#M335064</link>
      <description>&lt;P&gt;and the example. I ran the code and it helps me to see it on my own.&lt;/P&gt;</description>
      <pubDate>Fri, 02 Dec 2022 18:43:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Difference-between-using-If-versus-where/m-p/847479#M335064</guid>
      <dc:creator>abqdiane</dc:creator>
      <dc:date>2022-12-02T18:43:39Z</dc:date>
    </item>
    <item>
      <title>Re: Difference between using If versus where</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Difference-between-using-If-versus-where/m-p/847480#M335065</link>
      <description>&lt;P&gt;What a great way to remember!&lt;/P&gt;
&lt;P&gt;thanks.&lt;BR /&gt;Diane&lt;/P&gt;</description>
      <pubDate>Fri, 02 Dec 2022 18:44:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Difference-between-using-If-versus-where/m-p/847480#M335065</guid>
      <dc:creator>abqdiane</dc:creator>
      <dc:date>2022-12-02T18:44:11Z</dc:date>
    </item>
    <item>
      <title>Re: Difference between using If versus where</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Difference-between-using-If-versus-where/m-p/929757#M365807</link>
      <description>&lt;P&gt;The&amp;nbsp; output values of median we&amp;nbsp; are getting are as follows :&lt;/P&gt;&lt;P&gt;for group 'A' median=79,&lt;/P&gt;&lt;P&gt;for group 'B' median=89,&lt;/P&gt;&lt;P&gt;but when using this values as answer to questions in SAS practice test available on SAS website it shows as wrong answer.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Correct answer shown there are&amp;nbsp;&lt;/P&gt;&lt;P&gt;for group 'A' median=76.3&lt;/P&gt;&lt;P&gt;for group 'B' median=86.5&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can anyone please confirm what are the correct answers.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 27 May 2024 02:34:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Difference-between-using-If-versus-where/m-p/929757#M365807</guid>
      <dc:creator>Mansi24</dc:creator>
      <dc:date>2024-05-27T02:34:12Z</dc:date>
    </item>
    <item>
      <title>Re: Difference between using If versus where</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Difference-between-using-If-versus-where/m-p/929804#M365829</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/463687"&gt;@Mansi24&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;The&amp;nbsp; output values of median we&amp;nbsp; are getting are as follows :&lt;/P&gt;
&lt;P&gt;for group 'A' median=79,&lt;/P&gt;
&lt;P&gt;for group 'B' median=89,&lt;/P&gt;
&lt;P&gt;but when using this values as answer to questions in SAS practice test available on SAS website it shows as wrong answer.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Correct answer shown there are&amp;nbsp;&lt;/P&gt;
&lt;P&gt;for group 'A' median=76.3&lt;/P&gt;
&lt;P&gt;for group 'B' median=86.5&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can anyone please confirm what are the correct answers.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/463687"&gt;@Mansi24&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;No one knows what this means. You have given us no context and tried to ask in an old thread which is unrelated to your question. Please start a new thread, people will be happy to help you in a new thread. Please make sure you provide all necessary background and context to your question.&lt;/P&gt;</description>
      <pubDate>Mon, 27 May 2024 09:57:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Difference-between-using-If-versus-where/m-p/929804#M365829</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2024-05-27T09:57:22Z</dc:date>
    </item>
    <item>
      <title>Re: Difference between using If versus where</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Difference-between-using-If-versus-where/m-p/929985#M365898</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/463687"&gt;@Mansi24&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;The&amp;nbsp; output values of median we&amp;nbsp; are getting are as follows :&lt;/P&gt;
&lt;P&gt;for group 'A' median=79,&lt;/P&gt;
&lt;P&gt;for group 'B' median=89,&lt;/P&gt;
&lt;P&gt;but when using this values as answer to questions in SAS practice test available on SAS website it shows as wrong answer.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Correct answer shown there are&amp;nbsp;&lt;/P&gt;
&lt;P&gt;for group 'A' median=76.3&lt;/P&gt;
&lt;P&gt;for group 'B' median=86.5&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can anyone please confirm what are the correct answers.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&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;Without data and the actual code run there is no way to answer you question.&lt;/P&gt;
&lt;P&gt;Since you say this on the SAS website then post the link to the page with the DATA and then show us the code you ran against that data set.&lt;/P&gt;</description>
      <pubDate>Tue, 28 May 2024 17:44:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Difference-between-using-If-versus-where/m-p/929985#M365898</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2024-05-28T17:44:48Z</dc:date>
    </item>
  </channel>
</rss>

