Forum Discussion

viniciusosousa's avatar
viniciusosousa
Regular Visitor
5 years ago
Solved

Strange error with "Sort by Column"

Hi guys.

I'm trying to sort one column by another using the "Sort by Column" feature in the Data Section.

I created an "ORDEM" column that has no repeated values (guaranteed by Row_number () Over clause on my Oracle database), but I still get an error. I want order "MERCADO" by column "ORDEM"

To be sure, I also applied a "Removed Duplicates" to the column by PowerQuery, but I still get the same error.

 

DataErrorWhat I want

  • Hi viniciusosousa 

     

    The column to be used as the "sort by column" must contain at most one distinct value for each value in the column to be sorted.

    To make this work, you would need to set up ORDEM so that it (for example) contains 1 for MERCADO = 'BR', 2 for MERCADO = 'other value' and so on.

     

    Regards

    Owen

2 Replies

  • Hi viniciusosousa 

     

    The column to be used as the "sort by column" must contain at most one distinct value for each value in the column to be sorted.

    To make this work, you would need to set up ORDEM so that it (for example) contains 1 for MERCADO = 'BR', 2 for MERCADO = 'other value' and so on.

     

    Regards

    Owen