I bought my 2nd X5 - a 2002 BMW X5 4.6is with 120k miles on it.
After two weeks of owning the transmission failed and had to be replaced at a cost of $4k.
The dealer wanted $8k to replace, but did work with me on the installation of the rebuilt one I found online.
The vehicle is powerful and fun to drive, but I've spoken with other owners who have experienced tranny failure, so this may be a systemic issue.
My first X5 was a 2001 3.0 and I did not have any issue with it.