good article about timing
Once a value has been calculated, it is immutable, meaning it can no longer be changed.
Therefore I agree with previously mentioned that the order matters.
Also once I had a problem with nested let-clause -- it didn't want to update or it was updated too late - I don't know. Second case concerns link above of my answer. First possible case concerns global parameters of the query itself - described here - changing Confidentials helped me.
Open Power Query options,
Open confidentiality settings in Global or Current file section,
Check the last box saying something like "Always ignore"
In all other cases codes already given helped.