You will do me a middle-sized favor by telling me which story that's from

That particular quote in full is "I have no data yet. It is a capital mistake to theorize before one has the data. Insensibly, one begins to twist facts to suit theories, instead of theories to suit facts" and it comes from A Scandal in Bohemia, but there are similar sayings, such as "It is a capital mistake to theorize in advance of the facts" from The Adventure of the Second Stain and "It is a capital mistake to theorize before you have all the evidence. It biases the judgment." from A Study in Scarlet. Self - plagiarism?

I prefer the first one as it seems to set the issue out more completely. As wwh has said, it is from A Scandal in Bohemia.

Ed: I'll get this right eventually! Maybe.