<?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: Monthly report - comparing and reporting on changes in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Monthly-report-comparing-and-reporting-on-changes/m-p/403141#M278729</link>
    <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/3062"&gt;@DarthPathos&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;Haven't you told us that you're getting the data weekly? If so then why do you have 10 weeks in each of your "raw data" tabs?&lt;/P&gt;
&lt;P&gt;Is this really how you get the data? If so then what will make things really hard as&amp;nbsp;there isn't either a date or then at least a consecutive count of weeks (with week1 being the first week of the financial year).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Ideally: Post two data feeds (with dummy data) in the structure how you really get them.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also: Be aware that quite a few forum members won't/can't download Excel attachments.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And last but not least:&lt;/P&gt;
&lt;P&gt;If this data is from your finance department and the report for your finance department and it's only about 350 rows then eventually have them do that all in Excel.&lt;/P&gt;</description>
    <pubDate>Wed, 11 Oct 2017 13:26:58 GMT</pubDate>
    <dc:creator>Patrick</dc:creator>
    <dc:date>2017-10-11T13:26:58Z</dc:date>
    <item>
      <title>Monthly report - comparing and reporting on changes</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Monthly-report-comparing-and-reporting-on-changes/m-p/401302#M278721</link>
      <description>&lt;P&gt;Good morning all&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I work at a Hospital in Toronto, Ontario and I run a monthly report on counts and various stats.&amp;nbsp; Recently&amp;nbsp;we've noticed that as a result of audits / cleanup / reviews of one sort or another, a case that was closed as "Completed" may be moved to "Cancelled", even though the visit happened 3 months ago.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I've&amp;nbsp;now have been asked to generate a second report of changes so that the Finance department can make the necessary adjustments and add the comments that "X changed by Y amount" into their system.&amp;nbsp; I only need to compare the stats from this month to the previous month, and right now the only way I see doing this is by having a "Stats A" and "Stats B" table and then compare each value in A to its corresponding value in B, and then output that to a "Variance" table.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Does anyone have a more efficient or simpler way to approach this?&amp;nbsp; I have over 350 rows, so by the end of the fiscal year, I'm going to be comparing a rather large amount of data.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any ideas would be greatly appreciated &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;
&lt;P&gt;Chris&lt;/P&gt;</description>
      <pubDate>Thu, 05 Oct 2017 12:31:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Monthly-report-comparing-and-reporting-on-changes/m-p/401302#M278721</guid>
      <dc:creator>DarthPathos</dc:creator>
      <dc:date>2017-10-05T12:31:33Z</dc:date>
    </item>
    <item>
      <title>Re: Monthly report - comparing and reporting on changes</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Monthly-report-comparing-and-reporting-on-changes/m-p/401385#M278722</link>
      <description>&lt;P&gt;Can you provide with dummy data an example of what one of your "report" data sets looks like? The data not the report.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I don't see any way to get around your "variance table" but how it is constructed may have some options available.&lt;/P&gt;
&lt;P&gt;You comment about "350 rows" makes me think the comparison may run better if data is transposed to have a single row per month. Then first. and last. operators coupled with Lag and/or dif functions may apply.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There are some details that are missing. Your problem description implies that this would be a "by case" comparison. Is that correct? If so what goes into the report for a case that had a report in the last month but no activity in the current month?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What about New cases that would not have a previous month to compare?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Are all of the value to compare across months numeric, character or a combination?&lt;/P&gt;
&lt;P&gt;What is to be done with a value that was missing in a previous month but is in the current or vice versa? In some respects missing to a value might not be considered a change (though finance folks may be treating this as change from 0).&lt;/P&gt;
&lt;P&gt;Are the numeric comparisons to be a numeric difference or a percent change or something else?&lt;/P&gt;</description>
      <pubDate>Thu, 05 Oct 2017 15:09:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Monthly-report-comparing-and-reporting-on-changes/m-p/401385#M278722</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2017-10-05T15:09:32Z</dc:date>
    </item>
    <item>
      <title>Re: Monthly report - comparing and reporting on changes</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Monthly-report-comparing-and-reporting-on-changes/m-p/401387#M278723</link>
      <description>350 rows sounds like a pen and paper exercise but that was perhaps a typo...&lt;BR /&gt;So what is the obstacles in your approach? Comparing  data doesn't sound hard (not knowing the details of course).&lt;BR /&gt;I would strive for keeping all cases in a full history table to be able to keep track on status changes, and use that as basis for the analysis.</description>
      <pubDate>Thu, 05 Oct 2017 15:09:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Monthly-report-comparing-and-reporting-on-changes/m-p/401387#M278723</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2017-10-05T15:09:45Z</dc:date>
    </item>
    <item>
      <title>Re: Monthly report - comparing and reporting on changes</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Monthly-report-comparing-and-reporting-on-changes/m-p/401558#M278724</link>
      <description>&lt;P&gt;&lt;EM&gt;Can you provide with dummy data an example of what one of your "report" data sets looks like? The data not the report.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;It's strictly numeric data in the cells. I have 350 cost centres, and each week I have to report volumes of patients seen in each of the clinics / areas that correspond to the cost centre. &amp;nbsp;So Cost Centre is the row, Week Number is the column. &amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;You comment about "350 rows" makes me think the comparison may run better if data is transposed to have a single row per month. Then first. and last. operators coupled with Lag and/or dif functions may apply.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;Hadn't thought of that. &amp;nbsp;That would work.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;There are some details that are missing. Your problem description implies that this would be a "by case" comparison. Is that correct? &lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;Yes, if we're in week 23, I need to compare the value for the Cardiology Cost Centre 1234 to the same cost centre for last week, and put the variance in a new table.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;If so what goes into the report for a case that had a report in the last month but no activity in the current month?&amp;nbsp;&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;Every week I will have data to compare, as we're constantly running clinics.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;...What about New cases that would not have a previous month to compare?&amp;nbsp;&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;All cost centres are assigned at the fiscal year and it's extremely rare to add one in the middle.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Are all of the value to compare across months numeric, character or a combination?&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;Numeric.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;What is to be done with a value that was missing in a previous month but is in the current or vice versa? In some respects missing to a value might not be considered a change (though finance folks may be treating this as change from 0).&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;Missing values are treated as 0. &amp;nbsp;I've already built that into my code, as Finance likes to see 0s versus blanks.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Are the numeric comparisons to be a numeric difference or a percent change or something else?&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;Numeric - simply This Week - Last Week - Difference.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 06 Oct 2017 00:28:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Monthly-report-comparing-and-reporting-on-changes/m-p/401558#M278724</guid>
      <dc:creator>DarthPathos</dc:creator>
      <dc:date>2017-10-06T00:28:34Z</dc:date>
    </item>
    <item>
      <title>Re: Monthly report - comparing and reporting on changes</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Monthly-report-comparing-and-reporting-on-changes/m-p/401561#M278725</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13674"&gt;@LinusH&lt;/a&gt;&amp;nbsp;- the 350 rows wasn't, but the Monthly should have been Weekly. &amp;nbsp;As I mentioned in my response to ballardrw, I have 350 Cost Centres x 52 weeks, where the values are simply counts of patients seen. &amp;nbsp;Comparing the data isn't hard (I can do it in Excel rather quickly), I just was hoping for a more automated approach. &amp;nbsp;The history table was what I was looking for, I just wasn't sure how to compare this week's table to last week's and generate the variance output. &amp;nbsp;I don't know if PROC COMPARE would work; initially i was going to use PROC SQL but having to type out all the lines of code would drive me nuts. &amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Not sure if this clarifies anything. &amp;nbsp;Appreciate your time and have a good evening!&lt;/P&gt;
&lt;P&gt;Chris&lt;/P&gt;</description>
      <pubDate>Fri, 06 Oct 2017 00:32:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Monthly-report-comparing-and-reporting-on-changes/m-p/401561#M278725</guid>
      <dc:creator>DarthPathos</dc:creator>
      <dc:date>2017-10-06T00:32:37Z</dc:date>
    </item>
    <item>
      <title>Re: Monthly report - comparing and reporting on changes</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Monthly-report-comparing-and-reporting-on-changes/m-p/401845#M278726</link>
      <description>&lt;P&gt;How about some actual dummy data for two clinics and 3 weeks and what the result should look like?&lt;/P&gt;
&lt;P&gt;I'm not going to go to the work of attempting to dummy&amp;nbsp; up some data that may not actually work for your example.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And if your "week" is actually a variable with a date value the data set structure make work better as:&lt;/P&gt;
&lt;P&gt;CostCentre DateValue PatientCount&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;At which point&lt;/P&gt;
&lt;PRE&gt;data want;
   set have;
   by CostCentre DateValue;
   Patientdif = dif (PatientCount);
   if first.CostCentre then PatientDif=0;
run;&lt;/PRE&gt;
&lt;P&gt;adds the patient difference and either Proc Report or Tabulate would create the rows for CostCentre and Columns for the DateValue and display the difference.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 06 Oct 2017 16:47:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Monthly-report-comparing-and-reporting-on-changes/m-p/401845#M278726</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2017-10-06T16:47:17Z</dc:date>
    </item>
    <item>
      <title>Re: Monthly report - comparing and reporting on changes</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Monthly-report-comparing-and-reporting-on-changes/m-p/401868#M278727</link>
      <description>&lt;P&gt;I'll work on some dummy data this weekend and post back here when I have something &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&amp;nbsp; (I was hoping this was going to be an easy conversation, apparently I was wrong LOL).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks and have a great weekend - we have our Thanksgiving on Monday so I get three days off - wahoo!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Chris&lt;/P&gt;</description>
      <pubDate>Fri, 06 Oct 2017 18:15:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Monthly-report-comparing-and-reporting-on-changes/m-p/401868#M278727</guid>
      <dc:creator>DarthPathos</dc:creator>
      <dc:date>2017-10-06T18:15:17Z</dc:date>
    </item>
    <item>
      <title>Re: Monthly report - comparing and reporting on changes</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Monthly-report-comparing-and-reporting-on-changes/m-p/403134#M278728</link>
      <description>&lt;P&gt;Hi all&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I've created two dummy data sets and attached the Excel file here.&amp;nbsp;&amp;nbsp;Four tabs:&amp;nbsp; First is the summary for Weeks 1 - 10 and the second is the "raw data" file.&amp;nbsp; Third and fourth are the same but for Weeks 1 - 11.&amp;nbsp; Assume Weeks 1-10 was received in Week 11, and Weeks 1-11 was received in Week 12.&amp;nbsp; Values for each cell are random numbers so the variation will be more extreme than I typically see, but it gives an idea of what I'm looking at.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for your time and hope you're having a good week!&lt;/P&gt;
&lt;P&gt;Chris&lt;/P&gt;</description>
      <pubDate>Wed, 11 Oct 2017 12:42:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Monthly-report-comparing-and-reporting-on-changes/m-p/403134#M278728</guid>
      <dc:creator>DarthPathos</dc:creator>
      <dc:date>2017-10-11T12:42:26Z</dc:date>
    </item>
    <item>
      <title>Re: Monthly report - comparing and reporting on changes</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Monthly-report-comparing-and-reporting-on-changes/m-p/403141#M278729</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/3062"&gt;@DarthPathos&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;Haven't you told us that you're getting the data weekly? If so then why do you have 10 weeks in each of your "raw data" tabs?&lt;/P&gt;
&lt;P&gt;Is this really how you get the data? If so then what will make things really hard as&amp;nbsp;there isn't either a date or then at least a consecutive count of weeks (with week1 being the first week of the financial year).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Ideally: Post two data feeds (with dummy data) in the structure how you really get them.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also: Be aware that quite a few forum members won't/can't download Excel attachments.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And last but not least:&lt;/P&gt;
&lt;P&gt;If this data is from your finance department and the report for your finance department and it's only about 350 rows then eventually have them do that all in Excel.&lt;/P&gt;</description>
      <pubDate>Wed, 11 Oct 2017 13:26:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Monthly-report-comparing-and-reporting-on-changes/m-p/403141#M278729</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2017-10-11T13:26:58Z</dc:date>
    </item>
    <item>
      <title>Re: Monthly report - comparing and reporting on changes</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Monthly-report-comparing-and-reporting-on-changes/m-p/409469#M278730</link>
      <description>&lt;P&gt;Hi &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/12447"&gt;@Patrick&lt;/a&gt;&amp;nbsp;- I've gone back to Finance and am working to try and come up with a more reliable reconciliation process.&amp;nbsp; I'm hoping that I won't need to do all this extra work; it's becoming much larger and way more complex than originally planned.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for your time, and hope you're having a great week &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Chris&lt;/P&gt;</description>
      <pubDate>Wed, 01 Nov 2017 14:12:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Monthly-report-comparing-and-reporting-on-changes/m-p/409469#M278730</guid>
      <dc:creator>DarthPathos</dc:creator>
      <dc:date>2017-11-01T14:12:00Z</dc:date>
    </item>
  </channel>
</rss>

