[nQSError: 42039] Columns in BY clause of REPORT totalling function must be in select list. (HY000)

I got this error today with OBIEE 11.1.1.7.0. Obviously, all my columns were in the select list. I found a few blogs and articles with people asking for help for that bug but none of them provided/found a solution. Here is mine.

The Error

[nQSError: 42039] Columns in BY clause of REPORT totalling function must be in select list. (HY000)

The symptoms

The error is thrown when sorting one specific column (a measure) of a Table with 14 columns ((5 measures, 7 dimensions columns including 2 hierarchies). All the others columns could be sorted without problem except one.

 The solutions

Uncheck “Report-Based Total (when applicable)” in the aggregation rule of your measure. That’s it !

OBIEE 11G Aggregation Rule

 

It worked for me !