<?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: Which SAS procedure to use to create reports with different variable formats? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Which-SAS-procedure-to-use-to-create-reports-with-different/m-p/316341#M69109</link>
    <description>&lt;P&gt;I would suggest going further back in your process. Describe the content of the starting data before you do your "metrics". Best would be to provide some example data for at least 2 doctors and at least 2 years (which can be partial, the idea to to let us know what the data looks like). Instructions here: &lt;A href="https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-data-AKA-generate/ta-p/258712" target="_blank"&gt;https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-data-AKA-generate/ta-p/258712&lt;/A&gt; will show how to turn a data set into datastep code that can be pasted in the forum or&amp;nbsp;attached as a text file&amp;nbsp;so we can recreate the data and run code.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;From the results I see, if the data were one record per patient with doctor name, date, payment and time then this could likely be accomplished directly in either proc tabulate or report&lt;/P&gt;</description>
    <pubDate>Fri, 02 Dec 2016 18:31:00 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2016-12-02T18:31:00Z</dc:date>
    <item>
      <title>Which SAS procedure to use to create reports with different variable formats?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Which-SAS-procedure-to-use-to-create-reports-with-different/m-p/316334#M69105</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I would like to create a final report for each doctor&amp;nbsp;as follows:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Doctor A&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Metric &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2001 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 2002 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2003&lt;/P&gt;&lt;P&gt;----------------------------------------------------------------------&lt;/P&gt;&lt;P&gt;Hours worked&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2,540 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 5,789 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;3,274&lt;/P&gt;&lt;P&gt;Avg pts seen&amp;nbsp;per day &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;1.25&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;5.25&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;0.65&lt;/P&gt;&lt;P&gt;Compensation&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $2001 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $2002 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;$2003&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;lt;&amp;lt;another completely separate report for Doctor B&amp;gt;&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I currently have created individual datasets for each metric, normally using proc freq with a "by" statement or proc means with a "by" statement. I have been manually inputting the value of each proc freq or proc means for each doctor into an excel file to look like the above. However, my boss just informed me that my list of doctors has grown to over 100, so doing this manually is not going to work!&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;P&gt;I've been reading up on PROC REPORT, PROC TEMPLATE and even PROC PRINT. However, My problem is is that the data years (e.g., 2011) have different formats depending on the metric (e.g., some times I need to format with a dollar sign, other times it's a straight number and other times I need commas to express thousands), so merging by data year is not going to work in a data step.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does anyone have any suggestions?&lt;/P&gt;</description>
      <pubDate>Fri, 02 Dec 2016 18:13:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Which-SAS-procedure-to-use-to-create-reports-with-different/m-p/316334#M69105</guid>
      <dc:creator>sharonlee</dc:creator>
      <dc:date>2016-12-02T18:13:32Z</dc:date>
    </item>
    <item>
      <title>Re: Which SAS procedure to use to create reports with different variable formats?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Which-SAS-procedure-to-use-to-create-reports-with-different/m-p/316341#M69109</link>
      <description>&lt;P&gt;I would suggest going further back in your process. Describe the content of the starting data before you do your "metrics". Best would be to provide some example data for at least 2 doctors and at least 2 years (which can be partial, the idea to to let us know what the data looks like). Instructions here: &lt;A href="https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-data-AKA-generate/ta-p/258712" target="_blank"&gt;https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-data-AKA-generate/ta-p/258712&lt;/A&gt; will show how to turn a data set into datastep code that can be pasted in the forum or&amp;nbsp;attached as a text file&amp;nbsp;so we can recreate the data and run code.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;From the results I see, if the data were one record per patient with doctor name, date, payment and time then this could likely be accomplished directly in either proc tabulate or report&lt;/P&gt;</description>
      <pubDate>Fri, 02 Dec 2016 18:31:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Which-SAS-procedure-to-use-to-create-reports-with-different/m-p/316341#M69109</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2016-12-02T18:31:00Z</dc:date>
    </item>
    <item>
      <title>Re: Which SAS procedure to use to create reports with different variable formats?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Which-SAS-procedure-to-use-to-create-reports-with-different/m-p/316343#M69110</link>
      <description>&lt;P&gt;If you have a file with metrics and doctor then:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1. Convert all your values to character using PUT and the explicit format of interest.&lt;/P&gt;
&lt;P&gt;2. Sort by doctor and metric - you may need to add in an order variable for metric to get the exact order you want.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;3. Use PROC PRINT with a BY DOCTOR to get each doctors report printed into Excel.&lt;/P&gt;</description>
      <pubDate>Fri, 02 Dec 2016 18:37:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Which-SAS-procedure-to-use-to-create-reports-with-different/m-p/316343#M69110</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-12-02T18:37:19Z</dc:date>
    </item>
    <item>
      <title>Re: Which SAS procedure to use to create reports with different variable formats?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Which-SAS-procedure-to-use-to-create-reports-with-different/m-p/317786#M69598</link>
      <description>&lt;P&gt;Hi Ballardw,&lt;/P&gt;&lt;P&gt;The data are from a bunch of different datasources. I massage each dataset to come up with&amp;nbsp;what I displayed.&lt;/P&gt;</description>
      <pubDate>Fri, 09 Dec 2016 03:46:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Which-SAS-procedure-to-use-to-create-reports-with-different/m-p/317786#M69598</guid>
      <dc:creator>sharonlee</dc:creator>
      <dc:date>2016-12-09T03:46:32Z</dc:date>
    </item>
    <item>
      <title>Re: Which SAS procedure to use to create reports with different variable formats?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Which-SAS-procedure-to-use-to-create-reports-with-different/m-p/317787#M69599</link>
      <description>&lt;P&gt;This worked well. To make things look pretty, I outputed using ODS. Thanks!&lt;/P&gt;</description>
      <pubDate>Fri, 09 Dec 2016 03:47:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Which-SAS-procedure-to-use-to-create-reports-with-different/m-p/317787#M69599</guid>
      <dc:creator>sharonlee</dc:creator>
      <dc:date>2016-12-09T03:47:08Z</dc:date>
    </item>
  </channel>
</rss>

