
Be barking up the wrong tree
Figurative Meaning
The phrase implies a mistake in approach or strategy, not just location or direction. 
Colloquial Usage
It's common in casual speech but may be too informal for serious or formal writing. 
Avoid in Formal
Don't use it in formal settings like business reports or academic papers. 