The X is not a fun car from what I know (a lot:p), it gets boring very quickly, although the luxury you cant get enough of (in the loaded editions).
The 5 series petrol models are EXTREMELY fun to drive, I dont know why storm suggests otherwise. THe diesels are sporty too, but dont have the thrill of a BMW petrol.
My advice: certainly head on for a 5 series, and avoid the 520d, 525d- I believe they are underpowered. Unless youre in Karachi and need to drive bumper to bumper 
530i / 530d - beautiful rides should cost about 40 for a decent 04-05 model (Y)