Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 Analysis Server and Reporting Services (2008)
 SSAS - The sort order specified for distinct count

Author  Topic 

malachi151
Posting Yak Master

152 Posts

Posted - 2012-06-29 : 13:21:22
When trying to process a cube after adding a Distinct Count measure I get the following error:

The sort order specified for distinct count records is incorrect.

I've read that this is typically caused by different collations on the SQL Server and SSAS server. I've gone ahead and changed the collation on the SQL Server from SQL_Latin1_General_CP1_CI_AS to Latin1_General_CI_AS. The collation on the SSAS server is Latin1_General.

Even after these changes and refreshing the DSV, and deleting and re-adding the measure, etc. I still get the error.

Any ideas?

--------------------------------------------------
My blog: http://practicaltsql.net/
Twitter: @RGPSoftware

malachi151
Posting Yak Master

152 Posts

Posted - 2012-07-03 : 11:40:17
I figured this out. The problem was that even after setting the collation on the SQL Database to match that on the SSAS server, there was stil a conflict due to the fact that the column being used was a varchar instead of an nvarchar. It was resolved simply by casting the column to nvarchar in the calculated column that the distinct count is built on.

--------------------------------------------------
My blog: http://practicaltsql.net/
Twitter: @RGPSoftware
Go to Top of Page
   

- Advertisement -