Calculate Date&Time Difference only if condition is met

Hi all,

I’m trying to calculate Date&Time Difference between two columns but only when some other column’s value is “YES”.

For instance:

DATE 1 | DATE 2 | CONDITION | DIFFERENCE

apr-30 | may-1 | YES | 1

apr-12 | may-2 | NO |

apr-25 | apr-30 | YES | 5

apr-20 | apr-30 | NO | 10

I tried using flow variables but apparently the Date&Time Difference node does not accept this kind of variable.

Thank you so much in advance.