This is not working, and I need help fixing it, please.
if("Commission Type"='MRC',age_months(ifnull("MRC End Date",now()),"Closing Date"*-1,if("Commission Type"='Both',age_months(ifnull("MRC End Date",now()),"Closing Date",""))))
Basically, if "Commission Type" column = 'MRC' or 'Both' I want to calculate the number of months between "Closing Date" column and "MRC End Date" column *-1, but if "MRC End Date" is Null, then subtract "Closing Date" with now() *-1.
This formula works great without the IF statements: age_months(ifnull("MRC End Date",now()),"Closing Date")*-1
I just need to add the IF "Commission Type" column = 'MRC' or 'Both' to that formula.