Nightly we process our cube, and last night we had a failure during processing. The error code of interest stated:
Errors in the OLAP storage engine: The sort order specified for distinct count records is incorrect.
After much investigation, I was able to narrow it down to a negative (-1) value in the column used for the distinct count. Once I set the value to null, the cube processed without issue.
The column is a foreign key on the fact table to a dimension, and we have a convention where the -1 relates to an "(UNK)" dimension record.
Is there a setting or simple workaround to get the cube to process in this scenario?
So, almost a year later I ran into this issue again! I completely forgot that I had posted this question, until I found it during research! I thought, "that sounds familiar", and then noticed that I had posted it!
Anyways, after additional research and more thought, there are two answers to this question: