barking up the wrong tree

When someone says you are barking up the wrong tree they are saying that you are making a mistake or a false assumption. This can be in talking to someone based on an assumption that may be false, or making a mistake in what you are trying to achieve. Barking up the wrong tree is a cliche commonly used when someone has been attempting something and you have prior knowledge it will not be successful.