Hi community,
1.How to calculate the year which is 20 years from run date. E.g if today’s date is 11MAY2020, then this step will give year 2040.
2. Identify the collection which are linked with the strategies.
3.How to Calculate production for those collection from the historic production table for which the year value we get in step 1 in the date range in the collection name.
e.g if collection name is " Flexi 2040-42 (BLK) " then this collection will be picked up and production needs to be calculated for this collection for the corresponding strategy.
If no such collection is found for any plan, populate 0 in the corresponding months production fields.
4. perf Field of historic production table will be the production for that collection.
example of historic production table,
Bag Date perf
BP1 30042015 -0.08091
BP2 31052015 1.14936
BP2 30062015 -5.51757
BP2 31072015 2.32196
example of strategy table
strategy sc_no uni_collection
1895_264 A00086 X001
1900_277 A00087 X065
1896_598 A00086 X474
2035_629 A00100 X095
example of collection table
uni_collection Collection Bag
612Y Idx (BLK) BP2
X474 cptl 2073-75 (BLK) BY7
X001 Cptl 2040-42 (BLK) BP1
017R Cash 2016-2018 BP1
Thanks in advance
Edited
Hi @annypanny
data have;
format today_date date9.;
today_date = today();
year20 = year(intnx('year',today_date,20,"s"));
run;
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.