I guess the first question should have been, when you say "unsuccessfully," do you mean that it died after transplanting? Did you give it adequate water? And yes, as Hortaholic asks, was it getting adequate sun?
My thinking would have been the same as yours: that if the daylilies were happy, the soil was probably too heavy with organic matter for yarrow. I think your instincts were right and can't diagnose why it failed without more information. Although the two most common garden yarrows (Achillea millefolium and A. filipendulina) are known for adaptability, they are Mediterranean plants and prone to flopping in rich or excessively fertilized conditions. They thrive with regular moderate irrigation but they will not tolerate wet feet, hence the need for excellent drainage in pots...more grit, less peat. Treat it like lavender.