How can i simplify this formula

Regular Contributor

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

3 REPLIES 3
Certified Master Anaplanner

Re: How can i simplify this formula

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...

Master Anaplanner/Community Boss

Re: How can i simplify this formula

@neg177 and further to @Amaya reply you could put the IF 'S01 Time Filter'.Weekdays? before (Cash Collected Forecast - Other Forecast) as the logic implies that if it's a weekend then it will be zero, saves having to do that subtraction.

Regular Contributor

Re: How can i simplify this formula

This is Helpful. 

 

Thank you