<?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: SAS Studio, Programming 2, Lesson 2 Summarizing Data Challenge Practice in Programming 1 and 2</title>
    <link>https://communities.sas.com/t5/Programming-1-and-2/SAS-Studio-Programming-2-Lesson-2-Summarizing-Data-Challenge/m-p/700092#M660</link>
    <description>Hi Mary,&lt;BR /&gt;&lt;BR /&gt;Thank you for the prompt response. I did receive the same NOTE in my log.&lt;BR /&gt;&lt;BR /&gt;Upon closer look, it was a syntax error.&lt;BR /&gt;The code I ran was&lt;BR /&gt;data cuyahoga_maxtraffic;...&lt;BR /&gt;&lt;BR /&gt;TrafficCount=Count;&lt;BR /&gt;&lt;BR /&gt;instead of&lt;BR /&gt;TrafficMax=Count;&lt;BR /&gt;&lt;BR /&gt;I have the correct solution now, thank you so much.</description>
    <pubDate>Thu, 19 Nov 2020 04:45:12 GMT</pubDate>
    <dc:creator>Juli4</dc:creator>
    <dc:date>2020-11-19T04:45:12Z</dc:date>
    <item>
      <title>SAS Studio, Programming 2, Lesson 2 Summarizing Data Challenge Practice</title>
      <link>https://communities.sas.com/t5/Programming-1-and-2/SAS-Studio-Programming-2-Lesson-2-Summarizing-Data-Challenge/m-p/698927#M654</link>
      <description>&lt;P&gt;SAS Studio, Programming 2, Lesson 2 Summarizing Data Challenge Practice: Determining Maximum Amounts&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Question: Why am I not seeing the same number as the solution for question 2? I typed the same code, however, in my output table, the column for TrafficMax all result in the value '0'&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Question 2 of the challenge practice asks: "What is the value of TrafficMax in row 4, and why?"&lt;/P&gt;&lt;P&gt;Solution:&amp;nbsp;&lt;STRONG&gt;TrafficMax&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;retains the value of 1,447 from the previous row because the 772 value of&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Count&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;in row 4 is not greater than the current value of&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;TrafficMax&lt;/STRONG&gt;&lt;SPAN&gt;."&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;Create a table,&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;cuyahoga_maxtraffic&lt;/STRONG&gt;&lt;SPAN&gt;, from the&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;pg2.np_monthlytraffic&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;table. Use the following specifications:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/PRE&gt;&lt;UL&gt;&lt;LI&gt;Include only rows where&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;ParkName&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;is equal to&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;EM&gt;Cuyahoga Valley NP&lt;/EM&gt;.&lt;/LI&gt;&lt;LI&gt;Create three columns:&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;TrafficMax&lt;/STRONG&gt;,&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;MonthMax&lt;/STRONG&gt;, and&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;LocationMax&lt;/STRONG&gt;. Initialize&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;TrafficMax&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;to 0.&lt;/LI&gt;&lt;LI&gt;If the current traffic count is greater than the value in&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;TrafficMax&lt;/STRONG&gt;, then:&lt;UL&gt;&lt;LI&gt;set the value of&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;TrafficMax&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;equal to&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Count&lt;/STRONG&gt;&lt;/LI&gt;&lt;LI&gt;set the value of&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;MonthMax&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;equal to&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Month&lt;/STRONG&gt;, and&lt;/LI&gt;&lt;LI&gt;set the value of&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;LocationMax&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;equal to&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Location&lt;/STRONG&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;Format the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Count&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;and&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;TrafficMax&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;columns so that values are displayed with commas.&lt;/LI&gt;&lt;LI&gt;Keep only the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Location&lt;/STRONG&gt;,&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Month&lt;/STRONG&gt;,&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Count&lt;/STRONG&gt;,&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;TrafficMax&lt;/STRONG&gt;,&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;MonthMax&lt;/STRONG&gt;, and&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;LocationMax&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;columns in the output table.&lt;/LI&gt;&lt;LI&gt;Submit the program and examine the ouput data.&lt;/LI&gt;&lt;/UL&gt;&lt;PRE&gt;&lt;BR /&gt;data cuyahoga_maxtraffic;
    set pg2.np_monthlyTraffic;
    where ParkName = 'Cuyahoga Valley NP';
    retain TrafficMax 0 MonthMax LocationMax;
    if Count&amp;gt;TrafficMax then do;
        TrafficMax=Count;
        MonthMax=Month;
        LocationMax=Location;
    end;
    format Count TrafficMax comma15.;
    keep Location Month Count TrafficMax MonthMax LocationMax;
run;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;Thank you.&lt;/P&gt;</description>
      <pubDate>Sun, 15 Nov 2020 00:59:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Programming-1-and-2/SAS-Studio-Programming-2-Lesson-2-Summarizing-Data-Challenge/m-p/698927#M654</guid>
      <dc:creator>Juli4</dc:creator>
      <dc:date>2020-11-15T00:59:56Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Studio, Programming 2, Lesson 2 Summarizing Data Challenge Practice</title>
      <link>https://communities.sas.com/t5/Programming-1-and-2/SAS-Studio-Programming-2-Lesson-2-Summarizing-Data-Challenge/m-p/699261#M655</link>
      <description>&lt;P&gt;Hi Juli4,&lt;/P&gt;
&lt;P&gt;Your code does match the solution, and to double check I copied your code, ran it and I &lt;STRONG&gt;did&lt;/STRONG&gt; get the correct results.&amp;nbsp; There could be an issue with the input table.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Did you see the following NOTE in your log?&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#339966"&gt;NOTE: There were 384 observations read from the data set PG2.NP_MONTHLYTRAFFIC.&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#339966"&gt;WHERE ParkName='Cuyahoga Valley NP';&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000000"&gt;Thank you&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000000"&gt;Mary&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 16 Nov 2020 18:44:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Programming-1-and-2/SAS-Studio-Programming-2-Lesson-2-Summarizing-Data-Challenge/m-p/699261#M655</guid>
      <dc:creator>mharding</dc:creator>
      <dc:date>2020-11-16T18:44:06Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Studio, Programming 2, Lesson 2 Summarizing Data Challenge Practice</title>
      <link>https://communities.sas.com/t5/Programming-1-and-2/SAS-Studio-Programming-2-Lesson-2-Summarizing-Data-Challenge/m-p/700092#M660</link>
      <description>Hi Mary,&lt;BR /&gt;&lt;BR /&gt;Thank you for the prompt response. I did receive the same NOTE in my log.&lt;BR /&gt;&lt;BR /&gt;Upon closer look, it was a syntax error.&lt;BR /&gt;The code I ran was&lt;BR /&gt;data cuyahoga_maxtraffic;...&lt;BR /&gt;&lt;BR /&gt;TrafficCount=Count;&lt;BR /&gt;&lt;BR /&gt;instead of&lt;BR /&gt;TrafficMax=Count;&lt;BR /&gt;&lt;BR /&gt;I have the correct solution now, thank you so much.</description>
      <pubDate>Thu, 19 Nov 2020 04:45:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Programming-1-and-2/SAS-Studio-Programming-2-Lesson-2-Summarizing-Data-Challenge/m-p/700092#M660</guid>
      <dc:creator>Juli4</dc:creator>
      <dc:date>2020-11-19T04:45:12Z</dc:date>
    </item>
  </channel>
</rss>

