Réalisation d'une boucle IF Transformation programme SAS vers work flow Alteryx
Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
YOUCEF-KHODJA
5 - Atom
10-12-2023
05:31 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Bonjour,
Je souhaite réaliser une boucle "IF" dans le but de transformer un programme sas vers un workflow Alteryx.
J'ai besoin de réaliser une boucle qui contient un bloc de conditions et d'instruction.
Voici le code sas :
%let Valdate = 31MAR2020;
%put &Valdate.;
Data Procedure_0_0;
set database;
format valdate date9.;
valdate = "&Valdate"d;
format prev_valdate date9.;
prev_valdate = intnx('month',valdate,-3,'end');
Duration_if = int(max(0,(valdate - policy_start_date)));
Duration_if_LY = int(max(0,(prev_valdate - policy_start_date)));
Policy_Term = int(max(0,policy_end_date - policy_start_date));
Pure_Premium = Premium/1.19;
Issue_Year = year(policy_setup_date);
issue_month=month(policy_setup_date);
if year(valdate) > Issue_Year then
do;
UPR_BOY_Prorata = 0 ;
UPR_EOY_Prorata = 0 ;
Total_Earned_Prem_BOY_Prorata = 0;
Change_in_UPR_Prorata = 0;
end;
RUN;
Labels:
- Labels:
-
Macro
0 REPLIES 0