ifrs_id | report_date | ead | ecl | period_id | crr_stage_identifier | stage_movement |
X1 | 20161231 | 8 | 77 | current period | 2 | stage 1 to stage 2 |
X2 | 20161231 | 6 | 55 | current period | 1 | stage 3 to stage 1 |
X1 | 20161130 | 6 | 45 | previous period | 1 | |
X2 | 20161130 | 4 | 34 | previous period | 3 |
Hi folks,
I have all historial reords in a single lasr dataset as shown above ;I also got period_id to show period data in addtion to report_date.The credit rating field (crr_stage_identifier),a numeric item needs to be compared with previous period record and create the calculated character field, stage_movement with message as shown in the data above.
For example, IFRS_ID,X1 moved from credit rating stage 1 in previous period to stage 2 in current period and hence stage_movement got value as 'stage 1 to stage 2'.
same way, I would like to create caluated fields for ead and ecl differences from previous period.
I think the fastes and easiest way is to do some dataprep in a data step before you load the data into VA.
Then you can handle for example time gaps and other "defects" in your data.
With retain and firs/last you will get full control 🙂
//Fredrik
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
See how to use one filter for multiple data sources by mapping your data from SAS’ Alexandria McCall.
Find more tutorials on the SAS Users YouTube channel.