Hi Ravi,
You can use boolean function. And you can assign default value for e.g. Some pattern "@" so you can check value and assign to 'X' and 'Y' and if default pattern matches then clear it and assign to respective Target field.
Regards,
Gaurav Patwari