<?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: Answering questions from an excel data set in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Answering-questions-from-an-excel-data-set/m-p/520169#M141011</link>
    <description>&lt;P&gt;there are 48 months in the data , below are the two variables that I think I need from the data&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Ship date&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Profit&lt;/P&gt;&lt;P&gt;11/11/2016&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 219.582&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I guess how do I get month info from **bleep** date...?&lt;/P&gt;</description>
    <pubDate>Mon, 10 Dec 2018 21:54:38 GMT</pubDate>
    <dc:creator>nabeel284</dc:creator>
    <dc:date>2018-12-10T21:54:38Z</dc:date>
    <item>
      <title>Answering questions from an excel data set</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Answering-questions-from-an-excel-data-set/m-p/520152#M141002</link>
      <description>&lt;P&gt;&amp;nbsp;I have a sas data set (see excel sheet attached) where I need to answer the following 3 questions below....&lt;/P&gt;&lt;P&gt;since there is no month variable in the data I am not able to do a proc means to get highest profit .... any pointers would be appreciated.... thanks.... see attached data set...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Q1) &amp;nbsp;Of the 48 months in the data, which month has the highest total profit? Which month has the highest profit rate?&amp;nbsp; Show your results in a table, and allow two decimals for numbers and percentages.&amp;nbsp; ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Q2): Of the 12 months of a year, which month has the highest profit and which month has the highest profit rate? &amp;nbsp;&amp;nbsp;Are these two months the same?&amp;nbsp; If not, try to use data to explain why.&amp;nbsp; Similarly, clearly document your tables and format properly. ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Q3): &amp;nbsp;which product has the highest profit rate in each year?&amp;nbsp; You may need to use the variable sub_category. &amp;nbsp;&amp;nbsp;Create a table that shows the product and its profit rate and the year.&amp;nbsp; Format profit rate to as a percentage with 2 decimal places, e.g., 12.34%;&lt;/P&gt;</description>
      <pubDate>Mon, 10 Dec 2018 21:30:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Answering-questions-from-an-excel-data-set/m-p/520152#M141002</guid>
      <dc:creator>nabeel284</dc:creator>
      <dc:date>2018-12-10T21:30:38Z</dc:date>
    </item>
    <item>
      <title>Re: Answering questions from an excel data set</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Answering-questions-from-an-excel-data-set/m-p/520154#M141004</link>
      <description>&lt;P&gt;I don't think individuals will like opening an excel file to view the data.&amp;nbsp; Can you paste a sample of your data just in your question?&lt;/P&gt;</description>
      <pubDate>Mon, 10 Dec 2018 21:33:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Answering-questions-from-an-excel-data-set/m-p/520154#M141004</guid>
      <dc:creator>jdykstra</dc:creator>
      <dc:date>2018-12-10T21:33:56Z</dc:date>
    </item>
    <item>
      <title>Re: Answering questions from an excel data set</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Answering-questions-from-an-excel-data-set/m-p/520156#M141005</link>
      <description>&lt;P&gt;Please:&lt;/P&gt;
&lt;P&gt;Post example data in a data step with datalines; see my footnotes for hints.&lt;/P&gt;
&lt;P&gt;Post code you already tried.&lt;/P&gt;
&lt;P&gt;Post the log from your code.&lt;/P&gt;</description>
      <pubDate>Mon, 10 Dec 2018 21:38:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Answering-questions-from-an-excel-data-set/m-p/520156#M141005</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-12-10T21:38:27Z</dc:date>
    </item>
    <item>
      <title>Re: Answering questions from an excel data set</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Answering-questions-from-an-excel-data-set/m-p/520169#M141011</link>
      <description>&lt;P&gt;there are 48 months in the data , below are the two variables that I think I need from the data&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Ship date&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Profit&lt;/P&gt;&lt;P&gt;11/11/2016&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 219.582&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I guess how do I get month info from **bleep** date...?&lt;/P&gt;</description>
      <pubDate>Mon, 10 Dec 2018 21:54:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Answering-questions-from-an-excel-data-set/m-p/520169#M141011</guid>
      <dc:creator>nabeel284</dc:creator>
      <dc:date>2018-12-10T21:54:38Z</dc:date>
    </item>
    <item>
      <title>Re: Answering questions from an excel data set</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Answering-questions-from-an-excel-data-set/m-p/520171#M141013</link>
      <description>&lt;P&gt;hi kurt&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data is quite huge to put in data lines...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think I need to convert the shipdate variable which is in 11/11/2016 form to month for all the 48 months that are in the data and then see which month has the highest profit.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;profit and **bleep**date are variables in the data. profit is numer example 214.32&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 10 Dec 2018 21:58:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Answering-questions-from-an-excel-data-set/m-p/520171#M141013</guid>
      <dc:creator>nabeel284</dc:creator>
      <dc:date>2018-12-10T21:58:27Z</dc:date>
    </item>
    <item>
      <title>Re: Answering questions from an excel data set</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Answering-questions-from-an-excel-data-set/m-p/520179#M141017</link>
      <description>&lt;P&gt;The macro from my footnotes lets you specify the number of observations, so you can limit the data step to a number sufficient to illustrate your issue.&lt;/P&gt;</description>
      <pubDate>Mon, 10 Dec 2018 22:06:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Answering-questions-from-an-excel-data-set/m-p/520179#M141017</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-12-10T22:06:01Z</dc:date>
    </item>
    <item>
      <title>Re: Answering questions from an excel data set</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Answering-questions-from-an-excel-data-set/m-p/520183#M141021</link>
      <description>&lt;P&gt;data want; set have;&lt;/P&gt;&lt;P&gt;month = month(ship_date); run;&lt;/P&gt;</description>
      <pubDate>Mon, 10 Dec 2018 22:10:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Answering-questions-from-an-excel-data-set/m-p/520183#M141021</guid>
      <dc:creator>jdykstra</dc:creator>
      <dc:date>2018-12-10T22:10:40Z</dc:date>
    </item>
    <item>
      <title>Re: Answering questions from an excel data set</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Answering-questions-from-an-excel-data-set/m-p/520184#M141022</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Use MONTH/YEAR() to get the month/year from the date variables&lt;/LI&gt;
&lt;LI&gt;Use PROC MEANS to summarize.&amp;nbsp;&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can actually run a single proc means to get all the results in a single step if you know how to deal with the TYPES/WAYS statements.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This is homework, so I'll help, but not provide the answers and your pointers are above. If you need further help post what your code and answer is and a detailed explanation of what is not working.&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/250621"&gt;@nabeel284&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;&amp;nbsp;I have a sas data set (see excel sheet attached) where I need to answer the following 3 questions below....&lt;/P&gt;
&lt;P&gt;since&lt;STRONG&gt; there is no month variable&lt;/STRONG&gt; in the data I am not able to do a proc means to get highest profit .... any pointers would be appreciated.... thanks.... see attached data set...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Q1) &amp;nbsp;Of the 48 months in the data, which month has the highest total profit? Which month has the highest profit rate?&amp;nbsp; Show your results in a table, and allow two decimals for numbers and percentages.&amp;nbsp; ;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Q2): Of the 12 months of a year, which month has the highest profit and which month has the highest profit rate? &amp;nbsp;&amp;nbsp;Are these two months the same?&amp;nbsp; If not, try to use data to explain why.&amp;nbsp; Similarly, clearly document your tables and format properly. ;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Q3): &amp;nbsp;which product has the highest profit rate in each year?&amp;nbsp; You may need to use the variable sub_category. &amp;nbsp;&amp;nbsp;Create a table that shows the product and its profit rate and the year.&amp;nbsp; Format profit rate to as a percentage with 2 decimal places, e.g., 12.34%;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 10 Dec 2018 22:10:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Answering-questions-from-an-excel-data-set/m-p/520184#M141022</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-12-10T22:10:06Z</dc:date>
    </item>
    <item>
      <title>Re: Answering questions from an excel data set</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Answering-questions-from-an-excel-data-set/m-p/520185#M141023</link>
      <description>&lt;P&gt;Example of using a format with PROC MEANS to get the desired output.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://gist.github.com/statgeek/0cae5568752959b035516d6ac07a20fb" target="_blank"&gt;https://gist.github.com/statgeek/0cae5568752959b035516d6ac07a20fb&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 10 Dec 2018 22:12:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Answering-questions-from-an-excel-data-set/m-p/520185#M141023</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-12-10T22:12:30Z</dc:date>
    </item>
    <item>
      <title>Re: Answering questions from an excel data set</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Answering-questions-from-an-excel-data-set/m-p/520407#M141105</link>
      <description>&lt;P&gt;thank you all - I was able to solve the problem... using proc means and the month function to change the date format to month....&lt;/P&gt;</description>
      <pubDate>Tue, 11 Dec 2018 15:40:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Answering-questions-from-an-excel-data-set/m-p/520407#M141105</guid>
      <dc:creator>nabeel284</dc:creator>
      <dc:date>2018-12-11T15:40:16Z</dc:date>
    </item>
  </channel>
</rss>

