Hi Natasha,
That should be a good approximation if the charges are only separated by 1 bond. It gets more complicated when you have multiple cancelling dipoles.
That being said, I can't recall practically using the dipole moment formula practically for chemistry. I would call it a low yield topic.
I hope this helps!
Katt