The firms have need of a control mechanism in order to analyse whether they are achieving their goals. A tool that automates the business control process has been developed based on a case-based reasoning system. The objective of the system is to facilitate the process of internal auditing. The system analyses the data that characterises each one of the activities carried out by the firm, then determines the state of each activity and calculates the associated risk. This system uses a different problem solving method in each of the steps of the reasoning cycle. A Maximum Likelihood Hebbian Learning-based method that automates the organization of cases and the retrieval stage of case-based reasoning systems is presented in this paper. The proposed methodology has been derived as an extension of the Principal Component Analysis, and groups similar cases, identifying clusters automatically in a data set in an unsupervised mode. The system has been tested in 10 small and medium companies in the textile sector, located in the northwest of Spain and the results obtained have been very encouraging.