Yes, anything you withdraw is not available anymore for increasing the margin.
You need not make a difference between current and prior withdrawals when using the posted formulae. "W" means the total withdrawal, i.e. the sum of all your withdrawals since the first start.