My field guide lists no less than fourteen members of the willowherb family and as you would expect from related species separating them can be a challenge. As always, though, one can whittle the choices down by looking to see which ones occur in the area you are in and in Dorset this means there are only seven to worry about! From here you have to look for identifying features to separate them although you can use habitat as a useful guide as well.
With this in mind the great willowherb (Epilobium hirsutum) is easy to pick out from the seven options. Firstly, the use of the prefix 'great' is a good indicator. Not only is it a strong, robust plant growing to nearly two metres tall it also produces 'great' flowers, much larger than other members of the family and that alone should be enough to settle it. Just to be certain, if it is in flower between July and September and is growing in damp conditions in ditches, by ponds or along river banks then it is almost certainly great willowherb.
This is also known as codlins and cream but it is hard to see why. Codlin is an old country name for apples (codlin moths are a pest of apples) so why would a completely purple flower resemble apples and cream?