BookmarkSubscribeRSS Feed
vnreddy
Quartz | Level 8

Stage_transfer opening_stage closing_stage opening_balance closing_balance opening_period closing_period
Stage 1 to 1 1 1 37735.11 36092.9 31-Jan-19 31-Dec-19
Stage 1 to 2 1 2 55841.76 53787 31-Jan-19 31-Dec-19
Stage 1 to 3 1 3 17532.1 16256.83 31-Jan-19 31-Dec-19
Stage 2 to 1 2 1 17442.97 17115.08 31-Jan-19 31-Dec-19
Stage 2 to 2 2 2 64759.82 63959.25 31-Jan-19 31-Dec-19
Stage 2 to 3 2 3 35349.27 34116.02 31-Jan-19 31-Dec-19
Stage 3 to 1 3 1 6084.11 2227.07 31-Jan-19 31-Dec-19
Stage 3 to 2 3 2 57440.35 55322.16 31-Jan-19 31-Dec-19
Stage 3 to 3 3 3 16304.87 14736.68 31-Jan-19 31-Dec-19

Balance business rules:
balance at 1 January 2019 stage 1 (in millions) sum up the opening_balance based on opening_stage 1 e.g., sum(37735.11+55841.76+17532.1)
similarly stage 2 (in millions) sum up the opening_balance based on opening_stage 2 e.g., sum(17442.97+64759.82+35349.27)
stage 3 (in millions) sum up the opening_balance based on opening stage 3 e.g., sum(6084.11+57440.35+16304.87)

closing balance rules:
balance at 31 December 2019 stage 1(in millions) sum up the closing_balance based on closing_stage 1 e.g., sum(36092.9+17115.08+2227.07)
stage 2(in millions) sum up the closing_balance based on closing_stage 2 e.g., sum(53787+63959.25+55322.16)
stage 3(in millions) sum up the closing_balance based on closing_stage 3 e.g., sum(16256.83+34116.02+14736.68)

stage transfer business rules:
transfer to stage 1: sum of closing_balance horizontal 1 to 1, 1 to 2, 1 to 3
2 to 1, 2 to 2, 2 to 3
3 to 1, 3 to 1, 3 to 3

sample example is done in screenshot

 

Expected output:samp.jpeg

4 REPLIES 4
PaigeMiller
Diamond | Level 26

Please provide your data as SAS data step code, following these instructions, so we can actually work with it.

 

--
Paige Miller
vnreddy
Quartz | Level 8

Hi @PaigeMiller 

 

sorry for that, actually i am looking for some thing like the attached image (previous post) output format.

I have attached the sample data as well.

 

DATA WORK.NEMO_IMPAIRMENT_TESTING_0000;
28             LENGTH
29                 Stage            $ 12
30                 opening_stage      8
31                 closing_stage      8
32                 opening_balance    8
33                 closing_balance    8
34                 opening_period     8
35                 closing_period     8 ;
36             FORMAT
37                 Stage            $CHAR12.
38                 opening_stage    BEST12.
39                 closing_stage    BEST12.
40                 opening_balance  BEST12.
41                 closing_balance  BEST12.
42                 opening_period   DATE9.
43                 closing_period   DATE9. ;
44             INFORMAT
45                 Stage            $CHAR12.
46                 opening_stage    BEST12.
47                 closing_stage    BEST12.
48                 opening_balance  BEST12.
49                 closing_balance  BEST12.
50                 opening_period   DATE9.
51                 closing_period   DATE9. ;
52             INFILE 'M:\SASWORK\_TD14660_PBS-SAS-CP01_\#LN00138'
53                 LRECL=46
54                 ENCODING="WLATIN1"
55                 TERMSTR=CRLF
56                 DLM='7F'x
57                 MISSOVER
58                 DSD ;
2                                                          The SAS System                             09:21 Tuesday, January 7, 2020

59             INPUT
60                 Stage            : $CHAR12.
61                 opening_stage    : BEST32.
62                 closing_stage    : BEST32.
63                 opening_balance  : BEST32.
64                 closing_balance  : BEST32.
65                 opening_period   : BEST32.
66                 closing_period   : BEST32. ;
67         RUN;
vnreddy
Quartz | Level 8
Hi,
Can someone please help me with above requirement
PaigeMiller
Diamond | Level 26

Please provide your data as SAS data step code, following these instructions, so we can actually work with it.

--
Paige Miller

SAS INNOVATE 2024

Innovate_SAS_Blue.png

Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.

If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website. 

Register now!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

Get the $99 certification deal.jpg

 

 

Back in the Classroom!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 4 replies
  • 317 views
  • 0 likes
  • 2 in conversation