<?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: Calculating custom formula - between current and previous date with variable to be analyzed in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Calculating-custom-formula-between-current-and-previous-date/m-p/715063#M220836</link>
    <description>Yes, you're correct. I should have specified. There are 62 unique geogkeys&lt;BR /&gt;that are mapped to all the weeks. So you would be comparing the same&lt;BR /&gt;geogkeys for 2019 and 2020 when doing the calculation.&lt;BR /&gt;&lt;BR /&gt;This solution worked. Thank you so much!&lt;BR /&gt;</description>
    <pubDate>Thu, 28 Jan 2021 17:11:13 GMT</pubDate>
    <dc:creator>hojpoj93</dc:creator>
    <dc:date>2021-01-28T17:11:13Z</dc:date>
    <item>
      <title>Calculating custom formula - between current and previous date with variable to be analyzed</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Calculating-custom-formula-between-current-and-previous-date/m-p/714159#M220432</link>
      <description>&lt;P&gt;Dear SAS community:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a dataset like the following:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Week&lt;/TD&gt;&lt;TD&gt;geogkey&lt;/TD&gt;&lt;TD&gt;volume&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;3/10/2019&lt;/TD&gt;&lt;TD&gt;&amp;nbsp; &amp;nbsp;unique_geogkey1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/TD&gt;&lt;TD&gt;15000&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;"All dates in between"&lt;/TD&gt;&lt;TD&gt;....&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;12/15/2019&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;unique_geogkey2&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/TD&gt;&lt;TD&gt;16000&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;3/8/2020&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;unique_geogkey1&amp;nbsp; &amp;nbsp;&lt;/TD&gt;&lt;TD&gt;17000&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;"All dates in between"&lt;/TD&gt;&lt;TD&gt;...&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;12/13/2020&lt;/TD&gt;&lt;TD&gt;unique_geogkey1&lt;/TD&gt;&lt;TD&gt;18000&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to perform a computation between the current year date and the corresponding previous year date starting from 3/8/2020 until 12/13/2020. In my dataset, there are 62 unique geogkeys, each of them mapped to all the unique weeks. So total observations = 62*156 weeks. I want to group this by each unique &lt;STRONG&gt;geogkey and week combination&lt;/STRONG&gt;. i.e. there is a unique volume value for each week and geogkey combination.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For example, (3/8/2020 - 3/10/2019)*2 = (17000-15633)*2&lt;/P&gt;&lt;P&gt;Do this for each subsequent date until 12/13/2020 and the corresponding previous year (12/15/2019)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there a method that performs a more complex calculation besides the simple ones in proc summary e.g. sum= means= ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am currently attempting with a macro code to no avail:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;start_date = '08Mar2020'd;
end_date = '13Dec2020'd;

%macro catyrind(start_date,end_date);

    %do cat_period = &amp;amp;start_date %to &amp;amp;end_date;
         %let prev_date=%sysfunc(intnx(year,cat_period,-1,"sameday"));
         proc means data=walmart_catyrind nway noprint;
             class week geogkey;
             var sc; *this variable contains numeric values in the table
             output out=final_wm   ((cat_period)/(&amp;amp;prev_date))*100-100; *This is the necessary calculation
         run;
       
    %end;
%mend;

%catyrind(start_date,end_date);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I know the calculation above is out of order but was testing to see if it can be performed within the proc summary step.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;*The final output for the week variable should ONLY include the corresponding 2020 date and the 2019 week date will be dropped.&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The output would look something like this:&lt;/P&gt;&lt;P&gt;Geogkey&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Week&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; calculation&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;unique_id&amp;nbsp; &amp;nbsp; 3/8/2020&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;CODE class=" language-sas"&gt;(volume&amp;nbsp;of&amp;nbsp;3/8/2020)&amp;nbsp;/&amp;nbsp;(volume of 3/10/2019) *100-100&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&lt;CODE class=" language-sas"&gt;.....&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;unique_id&amp;nbsp; &amp;nbsp; unique_week_2020year&amp;nbsp; &amp;nbsp;&lt;CODE class=" language-sas"&gt;All&amp;nbsp;volume&amp;nbsp;for&amp;nbsp;weeks&amp;nbsp;in&amp;nbsp;between&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&lt;CODE class=" language-sas"&gt;......&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;unique_id&amp;nbsp; &amp;nbsp; 12/13/2020&amp;nbsp;&amp;nbsp; &lt;CODE class=" language-sas"&gt;(volume&amp;nbsp;of&amp;nbsp;12/13/2020)&amp;nbsp;/&amp;nbsp;(volume of 12/15/2019) *100-100&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Doesn't have to be a macro, any method would be helpful. Thanks in advance!&lt;/P&gt;</description>
      <pubDate>Thu, 28 Jan 2021 06:34:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Calculating-custom-formula-between-current-and-previous-date/m-p/714159#M220432</guid>
      <dc:creator>hojpoj93</dc:creator>
      <dc:date>2021-01-28T06:34:41Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating custom formula - between current and previous date with variable to be analyzed</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Calculating-custom-formula-between-current-and-previous-date/m-p/714162#M220434</link>
      <description>&lt;P&gt;Clarification&amp;nbsp; needed:&lt;/P&gt;
&lt;P&gt;1) In your example you use different day in computation: (8 vs 10)&lt;/P&gt;
&lt;PRE&gt;For example, (3/8/2020 - 3/10/2019)*2 = (17000-15633)*2&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;but in your code you compute with the same day:&lt;/P&gt;
&lt;PRE class="language-sas"&gt;&lt;CODE&gt;%let prev_date=%sysfunc(intnx(year,cat_period,-1,"sameday"));&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Are you looking first/following occurrence in 2020 vs. 2019 or for the&amp;nbsp;&lt;STRONG&gt;sameday&lt;/STRONG&gt; ?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;2) Is WEEK unique in the data set or are there more than one observation per week?&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; When unique you just need union data for same month-day observation and compute&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; the single pair and you don't need PROC MEANS.&lt;/P&gt;</description>
      <pubDate>Tue, 26 Jan 2021 06:43:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Calculating-custom-formula-between-current-and-previous-date/m-p/714162#M220434</guid>
      <dc:creator>Shmuel</dc:creator>
      <dc:date>2021-01-26T06:43:02Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating custom formula - between current and previous date with variable to be analyzed</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Calculating-custom-formula-between-current-and-previous-date/m-p/714406#M220552</link>
      <description>&lt;P&gt;1) I should have clarified - All dates end on SUNDAY and I want to find the corresponding date from the previous year that also ends on SUNDAY. Although they are written as single dates, 3/8 &amp;amp; 3/10 technically represent data for week ENDING on SUNDAY. Hence, they won't exactly align. I'm presuming I need to write a custom interval because I don't believe any default arguments are available.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2) Yes, week is UNIQUE within the data set. I am calculating data for each week-geogkey pair.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could you show an example of your union data method here?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 26 Jan 2021 20:27:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Calculating-custom-formula-between-current-and-previous-date/m-p/714406#M220552</guid>
      <dc:creator>hojpoj93</dc:creator>
      <dc:date>2021-01-26T20:27:55Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating custom formula - between current and previous date with variable to be analyzed</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Calculating-custom-formula-between-current-and-previous-date/m-p/714475#M220579</link>
      <description>&lt;P&gt;I do not understand what you are trying to do.&amp;nbsp; In particular, you have&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let prev_date=%sysfunc(intnx(year,cat_period,-1,"sameday"));&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;which tells me that the variable CAT_PERIOD is being treated as a date value.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So far so good.&amp;nbsp; But later you have&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;((cat_period)/(&amp;amp;prev_date))*100-100&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;which suggests you are dividing one date by another.&amp;nbsp; This make no sense to me.&amp;nbsp; For example, what if the PREV_DATE was 01jan1960, whose sas internal value is a zero - which makes for a bad divisor.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I suggest you write a code for a SINGLE date, without the macro loop.&amp;nbsp; Make sure it generates the expected results, and then show us the working code with a description of the apparent attempt to do it for weekly steps.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In general, it's best to write working code for a single instances prior to revising it to work in a parameterized macro.&amp;nbsp; I don't think that happened here.&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;</description>
      <pubDate>Wed, 27 Jan 2021 03:56:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Calculating-custom-formula-between-current-and-previous-date/m-p/714475#M220579</guid>
      <dc:creator>mkeintz</dc:creator>
      <dc:date>2021-01-27T03:56:17Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating custom formula - between current and previous date with variable to be analyzed</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Calculating-custom-formula-between-current-and-previous-date/m-p/714485#M220586</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sort data=df1;
by geogkey week;
run;

start_date = '10Mar2019'd;
end_date = '08Mar2020'd;

proc summary data=df1(where=(week=start_date or week=end_date)) noprint;
by week geogkey;
var sc;
output out=df2 /*calculation goes here*/;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;It would look similar to this where I would first sort the data by&amp;nbsp;&lt;STRONG&gt;geogkey&amp;nbsp;&lt;/STRONG&gt;and&amp;nbsp;&lt;STRONG&gt;week&amp;nbsp;&lt;/STRONG&gt;then define the start and end dates in yearly intervals with week ending Sunday.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then subset the data based on those start and end dates and do the custom calculation on the "&lt;STRONG&gt;sc&lt;/STRONG&gt;" variable for those dates. So for example, I wouldn't be subtracting two dates but the values corresponding to those dates.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I did a simple calculation and it worked, but I eventually need to go through every date from march to dec for 2019 and 2020 and perform the custom calculation.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jan 2021 06:58:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Calculating-custom-formula-between-current-and-previous-date/m-p/714485#M220586</guid>
      <dc:creator>hojpoj93</dc:creator>
      <dc:date>2021-01-27T06:58:22Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating custom formula - between current and previous date with variable to be analyzed</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Calculating-custom-formula-between-current-and-previous-date/m-p/714487#M220588</link>
      <description>&lt;P&gt;I understand that there is one observation per week per year, therefore I created two new variables - YEAR and WEEK from the date variable you called "week".&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have created a test data to contain all available week-dates from the presented data in your post.&lt;/P&gt;
&lt;P&gt;then merged 2019 data with 2020 data by week number.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I did not developed the statistic computing step, as I am not sure if next code realy helps you.&lt;/P&gt;
&lt;P&gt;Please run and check the intermediate as the last output dataset and express your opinion about it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The code is:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;/* Calculating custom formula - 
*  between current and previous date 
*  with variable to be analyzed
*************************************/
data test;
 infile cards dlm='09'x truncover;
 input week :mmddyy10. geokey1 geokey2 $ geokeyn $;
cards;
3/10/2019	15633	x1	y1
12/15/2019	16000	x2	y2
3/8/2020	17000	x3	y3
12/13/2020	18000	x4	y4
; run;
data have;  /* creating a full test data */
 set test;
  retain prevwk; 
  if _N_=1 then do;
     prevwk = week;
     year = year(week);
     wk = week(week);
	 output;
	 return;
  end; 
  if week - prevwk &amp;gt; 7 then do; /* assumed one obs per week */
     lastwk = week;
	 week = prevwk +7;
	 do until (week &amp;gt; lastwk);
        year = year(week);
        wk = week(week);
	    output;
		prevwk = week;
		week+7;
	 end;
  end;
  drop week prevwk lastwk;
run;	 
  
data union;
 format wk;
 merge have(where=(year=2019) rename=(geokey1=gk2019_1 geokey2=gk2019_2 geokeyn=gk2019_n))
       have(where=(year=2020) rename=(geokey1=gk2020_1 geokey2=gk2020_2 geokeyn=gk2020_n));
  by wk;
  drop year;
run;   &lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 27 Jan 2021 07:49:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Calculating-custom-formula-between-current-and-previous-date/m-p/714487#M220588</guid>
      <dc:creator>Shmuel</dc:creator>
      <dc:date>2021-01-27T07:49:37Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating custom formula - between current and previous date with variable to be analyzed</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Calculating-custom-formula-between-current-and-previous-date/m-p/714488#M220589</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/343020"&gt;@hojpoj93&lt;/a&gt;&amp;nbsp;please post some real test data.&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jan 2021 07:54:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Calculating-custom-formula-between-current-and-previous-date/m-p/714488#M220589</guid>
      <dc:creator>Shmuel</dc:creator>
      <dc:date>2021-01-27T07:54:12Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating custom formula - between current and previous date with variable to be analyzed</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Calculating-custom-formula-between-current-and-previous-date/m-p/714805#M220719</link>
      <description>&lt;P&gt;Thanks for the code!&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/88384"&gt;@Shmuel&lt;/a&gt;&amp;nbsp; This is the resulting dataset.&lt;/P&gt;&lt;P&gt;:&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="catyrind pic.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/54013iAAEC4ECD8AAA1554/image-size/medium?v=v2&amp;amp;px=400" role="button" title="catyrind pic.png" alt="catyrind pic.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is good because each there's observations for each week by year. However, I realized I set up the original data inefficiently and would have to transpose this again to get the final output. Sorry for the mixup. To save myself an unnecessary step, I changed the structure of the same data above. The volume is already summed up by unique week and geogkey. All I would need to do is perform the calculation of the volume values for the matching 2020 date rows and 2019 rows.&amp;nbsp;&lt;/P&gt;&lt;P&gt;For my final output, I ONLY want the 2020 week date and NOT the 2019 week date. Could you offer any suggestions. Hope this clarifies the question.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jan 2021 21:00:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Calculating-custom-formula-between-current-and-previous-date/m-p/714805#M220719</guid>
      <dc:creator>hojpoj93</dc:creator>
      <dc:date>2021-01-27T21:00:46Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating custom formula - between current and previous date with variable to be analyzed</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Calculating-custom-formula-between-current-and-previous-date/m-p/714876#M220757</link>
      <description>&lt;P&gt;Should not GEOKEYs in 2020 be the same you had in 2019 ?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I suppose that if there are GEOKEY1-GEOKEYn in 2020, most of them if not all,&lt;/P&gt;
&lt;P&gt;were in 2019 too.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In order to be able to compute and compare volume of 2020 to that of 2019 it should be on same line&lt;/P&gt;
&lt;P&gt;and for that need to separate the year and the week number in a year:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data temp;
 set have;
       year = year(WEEK);
       wk= week(WEEK);
run;
proc sort data=temp; by geokey wk; run;
data want;
  merge temp (where=(year=2020))
        temp (where=(year=2019) rename=(volume=v2019) drop=year)
    by geokey wk; 
        if missing(v2019) then calculated = .; else
        calculated = volume / v2019 *100 - 100;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I suppose that answers what you are looking for.&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;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 28 Jan 2021 05:18:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Calculating-custom-formula-between-current-and-previous-date/m-p/714876#M220757</guid>
      <dc:creator>Shmuel</dc:creator>
      <dc:date>2021-01-28T05:18:07Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating custom formula - between current and previous date with variable to be analyzed</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Calculating-custom-formula-between-current-and-previous-date/m-p/715063#M220836</link>
      <description>Yes, you're correct. I should have specified. There are 62 unique geogkeys&lt;BR /&gt;that are mapped to all the weeks. So you would be comparing the same&lt;BR /&gt;geogkeys for 2019 and 2020 when doing the calculation.&lt;BR /&gt;&lt;BR /&gt;This solution worked. Thank you so much!&lt;BR /&gt;</description>
      <pubDate>Thu, 28 Jan 2021 17:11:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Calculating-custom-formula-between-current-and-previous-date/m-p/715063#M220836</guid>
      <dc:creator>hojpoj93</dc:creator>
      <dc:date>2021-01-28T17:11:13Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating custom formula - between current and previous date with variable to be analyzed</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Calculating-custom-formula-between-current-and-previous-date/m-p/715064#M220837</link>
      <description>Yes, you're correct. I should have specified. There are 62 unique geogkeys that are mapped to all the weeks. So you would be comparing the same geogkeys for 2019 and 2020 when doing the calculation.&lt;BR /&gt;&lt;BR /&gt;This solution worked. Thank you so much!</description>
      <pubDate>Thu, 28 Jan 2021 17:12:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Calculating-custom-formula-between-current-and-previous-date/m-p/715064#M220837</guid>
      <dc:creator>hojpoj93</dc:creator>
      <dc:date>2021-01-28T17:12:01Z</dc:date>
    </item>
  </channel>
</rss>

