# How can i simplify this formula

Hi,

I would like to know how I can simplify this formula...

(Cash Collected Forecast - Other Forecast) * IF 'S01 Time Filter'.Weekdays? THEN IF WEEKDAY(START()) = 1 THEN OFFSET('Y03 Securitization'.Ending RTR Balance, -3, 0) ELSE PREVIOUS('Y03 Securitization'.Ending RTR Balance) ELSE 0 / IF 'S01 Time Filter'.Weekdays? THEN IF WEEKDAY(START()) = 1 THEN OFFSET('Y03 Securitization'.Ending RTR Balance, -3, 0) ELSE PREVIOUS('Y03 Securitization'.Ending RTR Balance) ELSE 0 + IF 'S01 Time Filter'.Weekdays? THEN IF WEEKDAY(START()) = 1 THEN OFFSET('Y04 Warehouse Tranche 1'.'Ending RTR Amount (Should Balance to BB Cert)', -3, 0) ELSE PREVIOUS('Y04 Warehouse Tranche 1'.'Ending RTR Amount (Should Balance to BB Cert)') ELSE 0.

Logic: (Cash Collected-Other Forcast)*Previous(Securitization) [Thing is I needed to not pick up my weekends, and using the previouse as Friday if it was Monday...ect

Tagged:

HI, @neg177

It would look something like this.

1.　create a module to calculate the number of days to OFFSET

number_to_offset : IF weekdays? THEN IF weekday <> 1 THEN -1 ELSE -3 ELSE 0

2．Rewrite in this way.

(Cash Collected Forecast - Other Forecast)

* IF 'S01 Time Filter'.Weekdays? THEN

(OFFSET('Y03 Securitization'.Ending RTR Balance, number_to_offset, 0)

/ OFFSET('Y03 Securitization'.Ending RTR Balance, number_to_offset, 0)

+ OFFSET('Y04 Warehouse Tranche 1'.'Ending RTR Amount (Should Balance to BB Cert)', number_to_offset, 0)

ELSE 0

I hope it helps.

P.S.

(* Y03 Securitization'.Ending RTR Balance / 'Y03 Securitization'.Ending RTR Balance ) will always 1

I'm sorry if I misunderstood...