<?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: Macro/Program to determine from tables (represent each month) rate of change for each field in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Macro-Program-to-determine-from-tables-represent-each-month-rate/m-p/402753#M278839</link>
    <description>&lt;P&gt;Thank you Proc Star! Appreciate the feedback, and the time! I am going to give this a try with the data set I think that is the best approach!&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 10 Oct 2017 13:51:31 GMT</pubDate>
    <dc:creator>khoff</dc:creator>
    <dc:date>2017-10-10T13:51:31Z</dc:date>
    <item>
      <title>Macro/Program to determine from tables (represent each month) rate of change for each field</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Macro-Program-to-determine-from-tables-represent-each-month-rate/m-p/402487#M278834</link>
      <description>&lt;P&gt;I created a library for this next project I am working on, and within it there will be 12 tables--one representing each month.&amp;nbsp; The goal is to see month-to-month the rate of change for each field. I have researched, and tried a few things and have had no luck. I am hoping to have it as an easily accessible/exportable finalize report.&amp;nbsp; I visualized having the table names (months) as the rows, and the column headers as the name of each field (they will be the same month to month).&amp;nbsp; I know I can use proc tabulate for this, but I am struggling with how to represent the change factor for each field from month to month. The field data is mostly &lt;STRONG&gt;qualitative&amp;nbsp;&lt;/STRONG&gt;data&amp;nbsp; I am new to the board, so please let me know if more info is needed.&amp;nbsp; Any ideas? Thank you in advance, any help is greatly appreciated! Macro preferred, any help appreciated!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Idea 1:&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Fields&lt;/P&gt;&lt;P&gt;Months&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Field 1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Field 2&amp;nbsp; &amp;nbsp; etc.....&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Jan to Feb&amp;nbsp; &amp;nbsp;100%&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;80%&lt;/P&gt;&lt;P&gt;Feb to Mar&amp;nbsp; &amp;nbsp;0%&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;50%&lt;/P&gt;&lt;P&gt;Mar to Apr&amp;nbsp; &amp;nbsp; 20%&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 100%&lt;/P&gt;&lt;P&gt;etc..&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Idea 2:&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Fields&lt;/P&gt;&lt;P&gt;Months&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Field 1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Field 2&amp;nbsp; &amp;nbsp; etc.....&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Jan to Feb&amp;nbsp; &amp;nbsp;Changed&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Not changed&lt;/P&gt;&lt;P&gt;Feb to Mar&amp;nbsp; &amp;nbsp;Not Changed&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Not Changed&lt;/P&gt;&lt;P&gt;Mar to Apr&amp;nbsp; &amp;nbsp;Changed&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Changed&lt;/P&gt;&lt;P&gt;etc..&lt;/P&gt;</description>
      <pubDate>Mon, 09 Oct 2017 19:25:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Macro-Program-to-determine-from-tables-represent-each-month-rate/m-p/402487#M278834</guid>
      <dc:creator>khoff</dc:creator>
      <dc:date>2017-10-09T19:25:10Z</dc:date>
    </item>
    <item>
      <title>Re: Macro/Program to determine from tables (represent each month) rate of change for each field</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Macro-Program-to-determine-from-tables-represent-each-month-rate/m-p/402506#M278835</link>
      <description>&lt;P&gt;Difficult to suggest something without seeing data.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I tend to give percentages a try, but with some minor modification: instead of 75% i would write -25% - seems to be easier to read. The main difference between your first and second idea is a fomat cloaking the real values.&lt;/P&gt;</description>
      <pubDate>Mon, 09 Oct 2017 20:40:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Macro-Program-to-determine-from-tables-represent-each-month-rate/m-p/402506#M278835</guid>
      <dc:creator>andreas_lds</dc:creator>
      <dc:date>2017-10-09T20:40:54Z</dc:date>
    </item>
    <item>
      <title>Re: Macro/Program to determine from tables (represent each month) rate of change for each field</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Macro-Program-to-determine-from-tables-represent-each-month-rate/m-p/402527#M278836</link>
      <description>&lt;P&gt;The coding is the easiest part. You first need to design the report you want.&lt;/P&gt;
&lt;P&gt;Otherwise you'll spend your time time writing never ending versions of unsatisfactory reports.&lt;/P&gt;
&lt;P&gt;A well-designed report is where an analyst brings value.&lt;/P&gt;
&lt;P&gt;Since you'll have 100+ numbers in a table (12 months times ?? variables), that's probably a level-2 report.&lt;/P&gt;
&lt;P&gt;For a high level grasp of the data, you could first have a graph to show all these figures. Then people can go see the details they want.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 09 Oct 2017 22:06:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Macro-Program-to-determine-from-tables-represent-each-month-rate/m-p/402527#M278836</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2017-10-09T22:06:07Z</dc:date>
    </item>
    <item>
      <title>Re: Macro/Program to determine from tables (represent each month) rate of change for each field</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Macro-Program-to-determine-from-tables-represent-each-month-rate/m-p/402565#M278837</link>
      <description>&lt;P&gt;Since there is no further reply, this example may get you started:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data HAVE;
  set SASHELP.CITIDAY;
  where DATE &amp;lt; '25jan1988'd;
  PCTDIFF_SNYDJCM =SNYDJCM /lag(SNYDJCM )-1; 
  PCTDIFF_SNYSECM =SNYSECM /lag(SNYSECM )-1;
  PCTDIFF_DSIUSWIL=DSIUSWIL/lag(DSIUSWIL)-1;
  PCTDIFF_DFXWCAN =DFXWCAN /lag(DFXWCAN )-1;
  PCTDIFF_DFXWUK90=DFXWUK90/lag(DFXWUK90)-1;
  PCTDIFF_DSIUKAS =DSIUKAS /lag(DSIUKAS )-1;
  PCTDIFF_DSIJPND =DSIJPND /lag(DSIJPND )-1;
  PCTDIFF_DCD1M   =DCD1M   /lag(DCD1M   )-1;
  PCTDIFF_DTBD3M  =DTBD3M  /lag(DTBD3M  )-1;
  if DATE &amp;gt; '04jan1988'd;
  format PCTDIFF: percent.;
run;

proc transpose out=TRANS;
  var PCTDIFF:;
  by DATE;
run;

ods graphics on / height=800px width=600px;
proc sgpanel data=TRANS;
  panelby _NAME_ / novarname columns=1 rows=9 headerattrs=(weight=Bold color=cx000088) spacing=10;
  vbar DATE / response=COL1;
  rowaxis label=' ';
  colaxis label=' ';
run;

proc tabulate data=TRANS;
  class DATE _NAME_;
  var COL1; 
  table DATE=' ', _NAME_=' '*COL1=' '*sum=' '*format=percent.; 
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 10 Oct 2017 01:59:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Macro-Program-to-determine-from-tables-represent-each-month-rate/m-p/402565#M278837</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2017-10-10T01:59:28Z</dc:date>
    </item>
    <item>
      <title>Re: Macro/Program to determine from tables (represent each month) rate of change for each field</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Macro-Program-to-determine-from-tables-represent-each-month-rate/m-p/402752#M278838</link>
      <description>&lt;P&gt;Thank you for the reply, much appreciated! I am going to give the report a try below and see where it gets me.&amp;nbsp; I cannot share any of the data sets as it is sensitive data with personal information&lt;/P&gt;</description>
      <pubDate>Tue, 10 Oct 2017 13:50:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Macro-Program-to-determine-from-tables-represent-each-month-rate/m-p/402752#M278838</guid>
      <dc:creator>khoff</dc:creator>
      <dc:date>2017-10-10T13:50:37Z</dc:date>
    </item>
    <item>
      <title>Re: Macro/Program to determine from tables (represent each month) rate of change for each field</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Macro-Program-to-determine-from-tables-represent-each-month-rate/m-p/402753#M278839</link>
      <description>&lt;P&gt;Thank you Proc Star! Appreciate the feedback, and the time! I am going to give this a try with the data set I think that is the best approach!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 10 Oct 2017 13:51:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Macro-Program-to-determine-from-tables-represent-each-month-rate/m-p/402753#M278839</guid>
      <dc:creator>khoff</dc:creator>
      <dc:date>2017-10-10T13:51:31Z</dc:date>
    </item>
  </channel>
</rss>

