Hi buddyduck. If you can check the car for stored trouble codes, that would be the easiest place to begin. The Crankshaft Position Sensor failing is also a common problem that can cause stalling or hard/no start conditions.
running rough and stalling at idle can also indicate air intake leak somewhere. the intake manifold gaskets on the LC accents are known to crap out, wouldn't doubt it on an X3 as well. error codes are essential here. it will be reporting something at this point.