append label only when formatted is not undefined