<?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: Repeating Calculations in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Repeating-Calculations/m-p/865003#M341564</link>
    <description>&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/19879"&gt;@Quentin&lt;/a&gt; You are so kind for all your msgs and code! I did not know I would get such support asking on here. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; I will test out your code on Monday and let you know. Have a great weekend!&lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Fri, 17 Mar 2023 22:56:58 GMT</pubDate>
    <dc:creator>SASFun1</dc:creator>
    <dc:date>2023-03-17T22:56:58Z</dc:date>
    <item>
      <title>Repeating Calculations</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Repeating-Calculations/m-p/864839#M341507</link>
      <description>Hi. I am trying to calculate a rate. I have the population (y) in a column and multiple other columns (x) that uses this column. I know the formula to calculate the rate but want to know the code to bypass the repetitive need to insert hundreds of calculated columns with the formula (x/y*100). How do I set up my DO Loop to create the additional columns for each x column for these calculated rates? Did my question make sense? Lol. And can I do this in Enterprise Guide or need to write a specific code? Thank you for reading!</description>
      <pubDate>Fri, 17 Mar 2023 14:04:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Repeating-Calculations/m-p/864839#M341507</guid>
      <dc:creator>SASFun1</dc:creator>
      <dc:date>2023-03-17T14:04:47Z</dc:date>
    </item>
    <item>
      <title>Re: Repeating Calculations</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Repeating-Calculations/m-p/864842#M341509</link>
      <description>&lt;P&gt;Can you post an example of your data (can be fake data), preferably as a DATA step with CARDS data? With just a few variables.&amp;nbsp; And then also show the dataset you would want to create?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It sounds like you could code this with arrays.&amp;nbsp; Or often it is better (and easier) to transpose the data to make it a "long" dataset rather than "wide."&amp;nbsp; After transposing it to long, you can typically code this sort of solution much more easily.&lt;/P&gt;</description>
      <pubDate>Fri, 17 Mar 2023 14:21:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Repeating-Calculations/m-p/864842#M341509</guid>
      <dc:creator>Quentin</dc:creator>
      <dc:date>2023-03-17T14:21:05Z</dc:date>
    </item>
    <item>
      <title>Re: Repeating Calculations</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Repeating-Calculations/m-p/864850#M341512</link>
      <description>&lt;P&gt;Hi Quentin,&lt;/P&gt;&lt;P&gt;Thanks for the reply! I uploaded an example in Excel. First tab is the data. Second tab is the desired additional calculated columns. Do you think I need to transpose this data to get the code to work?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 17 Mar 2023 14:31:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Repeating-Calculations/m-p/864850#M341512</guid>
      <dc:creator>SASFun1</dc:creator>
      <dc:date>2023-03-17T14:31:25Z</dc:date>
    </item>
    <item>
      <title>Re: Repeating Calculations</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Repeating-Calculations/m-p/864856#M341515</link>
      <description>&lt;P&gt;Many users here don't want to download Excel files because of virus potential, others have such things blocked by security software. Also if you give us Excel we have to create a SAS data set and due to the non-existent constraints on Excel data cells the result we end up with may not have variables of the same type (numeric or character) and even values.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;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 an existing SAS data set into data step code that can be pasted into a forum code box using the &amp;lt;/&amp;gt; icon or attached as text to show exactly what you have and that we can test code against.&lt;/P&gt;</description>
      <pubDate>Fri, 17 Mar 2023 14:43:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Repeating-Calculations/m-p/864856#M341515</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2023-03-17T14:43:59Z</dc:date>
    </item>
    <item>
      <title>Re: Repeating Calculations</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Repeating-Calculations/m-p/864863#M341519</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
set have;

array _input_vars(*) variable1-variable3;
array _output_vars(3) rate1-rate3;

do i=1 to dim(_input_vars);
     _output_vars(i) = population*_input_vars(i)/100;
end;

run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Here's a tutorial on using Arrays in SAS&lt;BR /&gt;&lt;A href="https://stats.idre.ucla.edu/sas/seminars/sas-arrays/" target="_blank"&gt;https://stats.idre.ucla.edu/sas/seminars/sas-arrays/&lt;/A&gt;&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/440923"&gt;@SASFun1&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hi Quentin,&lt;/P&gt;
&lt;P&gt;Thanks for the reply! I uploaded an example in Excel. First tab is the data. Second tab is the desired additional calculated columns. Do you think I need to transpose this data to get the code to work?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 17 Mar 2023 14:52:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Repeating-Calculations/m-p/864863#M341519</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2023-03-17T14:52:46Z</dc:date>
    </item>
    <item>
      <title>Re: Repeating Calculations</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Repeating-Calculations/m-p/864866#M341521</link>
      <description>&lt;P&gt;I am new. I apologize. Here is what was similar to my example in the Excel sheet. I'll work on creating that test code with the instructions you provided. Thanks ballardw. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Dataset&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Month Year&lt;/TD&gt;&lt;TD&gt;Population&lt;/TD&gt;&lt;TD&gt;Variable 1&lt;/TD&gt;&lt;TD&gt;Variable 2&lt;/TD&gt;&lt;TD&gt;Variable 3&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Jan 2022&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;20&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Feb 2022&lt;/TD&gt;&lt;TD&gt;40&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;7&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Mar 2022&lt;/TD&gt;&lt;TD&gt;60&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;8&lt;/TD&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Desired&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Month Year&lt;/TD&gt;&lt;TD&gt;Population&lt;/TD&gt;&lt;TD&gt;Variable 1&lt;/TD&gt;&lt;TD&gt;Calc Rate 1&lt;/TD&gt;&lt;TD&gt;Variable 2&lt;/TD&gt;&lt;TD&gt;Calc Rate 2&lt;/TD&gt;&lt;TD&gt;Variable 3&lt;/TD&gt;&lt;TD&gt;Calc Rate 3&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Jan 2022&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;20&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;1/20*100&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;TD&gt;0/20*100&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;1/20*100&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Feb 2022&lt;/TD&gt;&lt;TD&gt;40&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;TD&gt;0/40*100&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;1/40*100&lt;/TD&gt;&lt;TD&gt;7&lt;/TD&gt;&lt;TD&gt;7/40*100&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Mar 2022&lt;/TD&gt;&lt;TD&gt;60&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;2/60*100&lt;/TD&gt;&lt;TD&gt;8&lt;/TD&gt;&lt;TD&gt;8/60*100&lt;/TD&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;TD&gt;3/60*100&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;</description>
      <pubDate>Fri, 17 Mar 2023 15:01:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Repeating-Calculations/m-p/864866#M341521</guid>
      <dc:creator>SASFun1</dc:creator>
      <dc:date>2023-03-17T15:01:53Z</dc:date>
    </item>
    <item>
      <title>Re: Repeating Calculations</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Repeating-Calculations/m-p/864869#M341523</link>
      <description>&lt;P&gt;Thanks so much Reeza! I'll test this code out with my data set.&lt;/P&gt;</description>
      <pubDate>Fri, 17 Mar 2023 15:03:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Repeating-Calculations/m-p/864869#M341523</guid>
      <dc:creator>SASFun1</dc:creator>
      <dc:date>2023-03-17T15:03:36Z</dc:date>
    </item>
    <item>
      <title>Re: Repeating Calculations</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Repeating-Calculations/m-p/864978#M341552</link>
      <description>&lt;P&gt;I tested it out, and it did not work. I will check out the UCLA source you provided. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 17 Mar 2023 19:59:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Repeating-Calculations/m-p/864978#M341552</guid>
      <dc:creator>SASFun1</dc:creator>
      <dc:date>2023-03-17T19:59:42Z</dc:date>
    </item>
    <item>
      <title>Re: Repeating Calculations</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Repeating-Calculations/m-p/864979#M341553</link>
      <description>If you can describe more of the problem (did you get errors, unexpected results?) people will be able to help you more. Or better yet, post sample data with your code and describe the problem.&lt;BR /&gt;</description>
      <pubDate>Fri, 17 Mar 2023 20:02:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Repeating-Calculations/m-p/864979#M341553</guid>
      <dc:creator>Quentin</dc:creator>
      <dc:date>2023-03-17T20:02:56Z</dc:date>
    </item>
    <item>
      <title>Re: Repeating Calculations</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Repeating-Calculations/m-p/864996#M341559</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/440923"&gt;@SASFun1&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;I tested it out, and it did not work. I will check out the UCLA source you provided. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;STRONG&gt;Any &lt;/STRONG&gt;time that you get unexpected output or errors then share the LOG including the code and all messages from that step. Copy the text from the log, open a text box on the forum using the &amp;lt;/&amp;gt; and paste the text.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The text box is important to preserve formatting of the text so that the diagnostic information SAS often provides is in the correct place as the main message windows on this forum reformat text. Also the box separates the log information from discussion. Text because it is much easier to make minor corrections and paste a response then to try to deal with any image files.&lt;/P&gt;</description>
      <pubDate>Fri, 17 Mar 2023 21:51:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Repeating-Calculations/m-p/864996#M341559</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2023-03-17T21:51:15Z</dc:date>
    </item>
    <item>
      <title>Re: Repeating Calculations</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Repeating-Calculations/m-p/865002#M341563</link>
      <description>&lt;P&gt;Hmm&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13879"&gt;@Reeza&lt;/a&gt;'s array approach looks good to me.&amp;nbsp; I changed the calculation slightly:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have ;
  input MonthYear $8. Population Var1 Var2 Var3 ;
  cards ;
Jan 2022 20 1 0 1
Feb 2022 40	0 1 7
Mar 2022 60	2 8 3
;

data want;
  set have;

  array _input_vars(*) var1-var3;
  array _output_vars(3) rate1-rate3;

  do i=1 to dim(_input_vars);
    _output_vars(i) =_input_vars(i)/population*100;
  end;

  drop i ;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Or if you want to try the transpose to long approach I mentioned, something like:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sort data=have ;
  by MonthYear Population;
run ;

proc transpose data=have out=vert ;
  by MonthYear Population;
run ;

data want ;
  set vert ;
  rate=Col1/Population*100 ;
run ;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 17 Mar 2023 22:44:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Repeating-Calculations/m-p/865002#M341563</guid>
      <dc:creator>Quentin</dc:creator>
      <dc:date>2023-03-17T22:44:38Z</dc:date>
    </item>
    <item>
      <title>Re: Repeating Calculations</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Repeating-Calculations/m-p/865003#M341564</link>
      <description>&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/19879"&gt;@Quentin&lt;/a&gt; You are so kind for all your msgs and code! I did not know I would get such support asking on here. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; I will test out your code on Monday and let you know. Have a great weekend!&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 17 Mar 2023 22:56:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Repeating-Calculations/m-p/865003#M341564</guid>
      <dc:creator>SASFun1</dc:creator>
      <dc:date>2023-03-17T22:56:58Z</dc:date>
    </item>
    <item>
      <title>Re: Repeating Calculations</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Repeating-Calculations/m-p/865011#M341569</link>
      <description>&lt;P&gt;Hello, I've read your question and found out that your problem is somehow similar with a problem I encountered a week ago. By then, I was trying to test the normality of a certain variable when grouped by multiple categorical variables. Since the CLASS statement can only put one variable in, I had to repeat PROC UNIVARIATE many times to do this job. The CALL EXECUTE routine perfectly solved my problem. Since your problem is also centered on repetitive work, I think that it might also work for you. See the code in the solution of &lt;A title="https://communities.sas.com/t5/SAS-Programming/How-should-I-use-SAS-macro-to-perform-PROC-UNIVARIATE/m-p/864878#M341526" href="https://communities.sas.com/t5/SAS-Programming/How-should-I-use-SAS-macro-to-perform-PROC-UNIVARIATE/m-p/864878#M341526" target="_blank" rel="noopener"&gt;How should I use SAS macro to perform PROC UNIVARIATE repetitively?&lt;/A&gt;&amp;nbsp;for more details. The method was suggested to me by&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13884"&gt;@ballardw&lt;/a&gt;. I later made some adjustments to the code and eventually formed the code in the solution. I hope it will be helpful to you.&lt;/P&gt;</description>
      <pubDate>Sat, 18 Mar 2023 01:43:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Repeating-Calculations/m-p/865011#M341569</guid>
      <dc:creator>Season</dc:creator>
      <dc:date>2023-03-18T01:43:18Z</dc:date>
    </item>
    <item>
      <title>Re: Repeating Calculations</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Repeating-Calculations/m-p/865302#M341709</link>
      <description>&lt;P&gt;Hope you had a great weekend. I tried your top code - no errors and calculated correctly. But it only calculated Jan 2022's numbers. I'm thinking I need to incorporate DO loops? Second code with transposing would still need repetitive coding for the other rates. Thank you though!&lt;/P&gt;</description>
      <pubDate>Mon, 20 Mar 2023 20:31:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Repeating-Calculations/m-p/865302#M341709</guid>
      <dc:creator>SASFun1</dc:creator>
      <dc:date>2023-03-20T20:31:01Z</dc:date>
    </item>
    <item>
      <title>Re: Repeating Calculations</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Repeating-Calculations/m-p/865307#M341714</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm not sure what you mean.&amp;nbsp; My top code (which is Really&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13879"&gt;@Reeza&lt;/a&gt;'s code with a small edit):&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have ;
  input MonthYear $8. Population Var1 Var2 Var3 ;
  cards ;
Jan 2022 20 1 0 1
Feb 2022 40	0 1 7
Mar 2022 60	2 8 3
;

data want;
  set have;

  array _input_vars(*) var1-var3;
  array _output_vars(3) rate1-rate3;

  do i=1 to dim(_input_vars);
    _output_vars(i) =_input_vars(i)/population*100;
  end;

  drop i ;
run;

proc print data=want ;
run ;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Looks like it generates your DESIRED dataset, with data for all three months:&lt;/P&gt;
&lt;PRE&gt;        Month
Obs      Year      Population    Var1    Var2    Var3     rate1      rate2     rate3

 1     Jan 2022        20          1       0       1     5.00000     0.0000      5.0
 2     Feb 2022        40          0       1       7     0.00000     2.5000     17.5
 3     Mar 2022        60          2       8       3     3.33333    13.3333      5.0

&lt;/PRE&gt;
&lt;P&gt;I must&amp;nbsp; be misunderstanding something.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 20 Mar 2023 21:15:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Repeating-Calculations/m-p/865307#M341714</guid>
      <dc:creator>Quentin</dc:creator>
      <dc:date>2023-03-20T21:15:48Z</dc:date>
    </item>
    <item>
      <title>Re: Repeating Calculations</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Repeating-Calculations/m-p/865317#M341724</link>
      <description>&lt;P&gt;No,&amp;nbsp;&lt;A href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13879" target="_blank"&gt;@Reeza&lt;/A&gt;&lt;SPAN&gt;'s code with the small edit by you works perfectly at my end now. I was in Enterprise Guide, not SAS 9.4 (face palm) I told you guys I am new to this &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Now, I need to figure out how to incorporate this with my extremely large dataset. It said I submitted a code that contains lines longer than 6000 characters and aborted the submission lol. I broke it up by year and lower variables (I have up to 200+ and working with 5 years' worth&amp;nbsp;of monthly data).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thank you both&amp;nbsp;very much. Much appreciated for the code to work off from!&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 20 Mar 2023 22:03:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Repeating-Calculations/m-p/865317#M341724</guid>
      <dc:creator>SASFun1</dc:creator>
      <dc:date>2023-03-20T22:03:39Z</dc:date>
    </item>
  </channel>
</rss>

