Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
If(len(trim([K04 Date]))<>0 ,
(if(day([K04 Date])<=15,date(monthstart(addmonths([K04 Date],1))),date(monthstart(addmonths([K04 Date],2))))),
if([LM Workout Status Act]='IN TRIAL',[K04 Date],
If(len(trim([367]))<>0 ,
(if(day([367])<=15,date(monthstart(addmonths([367],1))),date(monthstart(addmonths([367],2))))),
if([LM Workout Status Act]='IN TRIAL',[367]
)))) as [trial1_due_dt] ,
The above statement says that if a K04 date is greater than 0 then
If that K04 date occurred <=15 days into the month show the first day of the next month else
If that same K04 date occurred >15 days into the month increment it by 2 months
We do the same for the 367 date. Here is my question.
I now need to add in a new scenario. If a loan_type=’CRM’ and K04 Date >=21 days then add 3 months and show the first day of that month, otherwise we keep the same logic as presented. How would I incorporate this new scenario in the above sample logic
Put your new condition in an if statement around your current expression with your second expression as the false branch of the if statement.
IF( ...new conditions here.... , ...new expression here... ,
If(len(trim([K04 Date]))<>0 ,
(if(day([K04 Date])<=15,date(monthstart(addmonths([K04 Date],1))),date(monthstart(addmonths([K04 Date],2))))),
if([LM Workout Status Act]='IN TRIAL',[K04 Date],
If(len(trim([367]))<>0 ,
(if(day([367])<=15,date(monthstart(addmonths([367],1))),date(monthstart(addmonths([367],2))))),
if([LM Workout Status Act]='IN TRIAL',[367]
)))))as [trial1_due_dt]