Alteryx IO Discussions

Customize and extend the power of Alteryx with SDKs, APIs, custom tools, and more.

Réalisation d'une boucle IF Transformation programme SAS vers work flow Alteryx

YOUCEF-KHODJA
5 - Atom

 

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;

 

 

0 REPLIES 0