The application of Compresses Sensing is a promising physical layer technology for the joint activity and data detection of signals. Detecting the activity pattern correctly has severe impact on the system performance and is therefore of major concern. In contrast to previous work, in this paper we optimize joint activity and data detection in under-determined systems by minimizing the Bayes-Risk for erroneous activity detection. We formulate a new Compressed Sensing Bayes-Risk detector which directly allows to influence error rates at the activity detection dynamically by a parameter that can be controlled at higher layers. We derive the detector for a general linear system and show that our detector outperforms classical Compressed Sensing approaches by investigating an overloaded CDMA system.