I do not understand why are you using tonumber and replace functions.
Try the below ones:
=Sum(If([Plant]="XYZ";[Qty];0))
or,
=Sum([Qty] where ([Plant]="XYZ"))
I do not understand why are you using tonumber and replace functions.
Try the below ones:
=Sum(If([Plant]="XYZ";[Qty];0))
or,
=Sum([Qty] where ([Plant]="XYZ"))