Forum Discussion
How Do I Avoid Alphabetical Sorting?
- Anonymous9 years ago
You need a numeric or alphabetic column that corresponds to that original sort order, then use that to sort.
No, I wouldn't expect that. The only natural sort orders are alphanumeric or date. Any other order would need to be specified by some other piece of data, such as a row index number. A row index number would be a column in a database. If you don't have a column that corresponds to that piece of data, you don't have that sort order.
I have the same problem... I am trying to display text in a multi-row card or a table or a matrix or anything. Power BI sorts my data alphabetically. I do not want it sorted. So I added a sortby column. However, I cannot hide this sort column from the user.
I sorted the data in the data view. But when I add it to a multi-row card or table PowerBi sorts it for me.
- dawidvh8 years agoHelper I
I agree, it would be nice to just display the data in the order in which Power BI received it.
- eugen-nw8 years agoRegular Visitor
I have the data sorted in the query behind the visual - on multiple columns - so that's the order I want to see in the table as well. Not the default behaviour which is to have the Table visual automatically sort the data for me automatically in ascending order on the first column. Please add the "don't sort" option to the Table visual.
- Anonymous6 years agoNot applicable
The order of the data is not always arbitrary in common, real-life settings. E.g. load a csv file, or make an SQL query with an "order by" clause. If the order is fixed in the source it is preserved in Power BI and sometimes you might want to trust that source. It's not a textbook un-ordered set of relations. So I don't see what is wrong with allowing the table's original order as an option.
The present solution here is: add an order column, go to the table view, sort you labels column by the order column -- but be careful, that is different from sorting the table itself by the order column even though the resulting table looks exactly the same... so make sure you click on your label column then go up to the columns tab and click the "sort by column" button there, not any of the other sorting options... This seems surpising to me for such a simple feature.
- Anonymous8 years agoNot applicable
"The order in which Power BI receives it" would be an arbitrary order unique to any given query or refresh. It would essentially be completely random. So that wouldn't help you.
- AndersTS7 years agoRegular Visitor
You can add a sort order column based on one or more column s that you want to sort on. Add that column to the table in the report and sort by that column. You can shrink the size of that column so it is not showing. You cannot hide it but you can shrink it to nothing so it doesnt show anyway.
- dawidvh7 years agoHelper I
Hi Anonymous,
That would greatly depend on the data source that you use. If you are using JSON for an examle, you might want to display the data in the exact order you received it as the data source might have already sorted it in a specific order that is not necessary chronologically or alpha-numerically sorted or sortable.