Calculated column for differences between two column dates with blank check if blank use another column for difference – Sharepoint list

I am trying to create a calculated column which shows the number of days’ difference between two columns which have dates in them. I understand that I can get this with the following formula:

=DATEDIF((Date 1),(Date 2),”D”)
which indeed works, as long as there is a date in both columns.

I am looking for formula – if one of the date is blank, then it should use another column date to find difference

My Calculated column would be names as (daysvacant)
Days between (PositionFilleddate) – (resigneddate)

if (Positionfilleddate) is blank, then i want (Today)-(resigneddate)

Thanks in Advance
Raju