On the Ledrappier–Young formula for self-affine measures