Note: This is an old article. However, the troubleshooting tips may still apply to newer versions.
During deploy and execute of a cube that contains a distinct count measure, the process fails with the following error message:
The sort order specified for distinct count records is incorrect
This is most likely cause by different collations being used on the data warehouse database and the Analysis Services database. In many cases the data warehouse database will be using a SQL Server collation such as SQL_Latin1_General_CP1_CI_AS while Analysis Services will often use the Windows collation Latin1_General_CI_AS. Although much alike, these are not identical.
Modify the collation settings of the data warehouse and Analysis Services databases to the same Windows collation.