Subdiagrams and invariant measures of Bratteli diagrams