Hi All, I would like to automate the calculation below , I have to create these calculated fields like 100 times as I have 100 variables to analyse, The example below only does it for 5 variables...Your help woul be really much appreciated!! Many Thanks V1_amt_32 = sum(V1_amt_mth_03, V1_amt_mth_02) / min(tenure, 2); V1_amt_432 = sum(V1_amt_mth_04, V1_amt_mth_03, V1_amt_mth_02) / min(tenure, 3); if V1_amt_mth_04 ne . or V1_amt_mth_05 ne . then V1_amt_54 = sum(V1_amt_mth_05, V1_amt_mth_04) / min(tenure, 2); V2_amt_32 = sum(V2_amt_mth_03, V2_amt_mth_02) / min(tenure, 2); V2_amt_432 = sum(V2_amt_mth_04, V2_amt_mth_03, V2_amt_mth_02) / min(tenure, 3); if V2_amt_mth_04 ne . or V2_amt_mth_05 ne . then V2_amt_54 = sum(V2_amt_mth_05, V2_amt_mth_04) / min(tenure, 2); V3_units_32 = sum(V3_units_mth_03, V3_units_mth_02) / min(tenure, 2); V3_units_432 = sum(V3_units_mth_04, V3_units_mth_03, V3_units_mth_02) / min(tenure, 3); if V3_units_mth_04 ne . or V3_units_mth_05 ne . then V3_units_54 = sum(V3_units_mth_05, V3_units_mth_04) / min(tenure, 2); V4_32 = sum(V4_mth_03, V4_mth_02) / min(tenure, 2); V4_432 = sum(V4_mth_04, V4_mth_03, V4_mth_02) / min(tenure, 3); if V4_mth_04 ne . or V4_mth_05 ne . then V4_54 = sum(V4_mth_05, V4_mth_04) / min(tenure, 2); V5_32 = sum(V5_mth_03, V5_mth_02) / min(tenure, 2); V5_432 = sum(V5_mth_04, V5_mth_03, V5_mth_02) / min(tenure, 3); if V5_mth_04 ne . or V5_mth_05 ne . then V5_54 = sum(V5_mth_05, V5_mth_04) / min(tenure, 2);
... View more