Reply
Frequent Visitor
Posts: 2
Registered: ‎08-09-2018

Re: How Do I Sort By Source File, Not Alphabetical?

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.

Visitor
Posts: 1
Registered: ‎04-05-2018

Re: How Do I Sort By Source File, Not Alphabetical?

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.

Regular Visitor
Posts: 20
Registered: ‎10-31-2018

Re: How Do I Avoid Alphabetical Sorting?

I find it hard to belive that PBI will have such a counterintuitive (and, under some circumstances, outright stupid) "feature" as a non-preventable sorting. So if I have a table where the first column is presented in some logical order (say, animals by ascending size - dog, horse, elephant), there is no way to preserve that order without resorting to all sorts of unnecessary gymnastics?

 

Is there really no way to prevent it?

Highlighted
Super User
Posts: 1,183
Registered: ‎12-29-2015

Re: How Do I Avoid Alphabetical Sorting?

@RBear I'm not sure what the difficulty is. If you want a non-alphanumeric sort order, provide another column that has that order. Then under Modeling, select Sort By Another Column and choose the sort order column. So in your example, you would create two columns:

 

Animal     SortOrder

Dog          1

Elephant   3

Horse       2

 

 

I don't know if that's what you're refering to as unnecessary gymnastics but I can't think of any simpler alternative.

Regular Visitor
Posts: 20
Registered: ‎10-31-2018

Re: How Do I Avoid Alphabetical Sorting?



If you want a non-alphanumeric sort order, provide another column that has that order. Then under Modeling, select Sort By Another Column and choose the sort order column. So in your example, you would create two columns:

 

Animal     SortOrder

Dog          1

Elephant   3

Horse       2



Yes, this works, but it entails more than you let on - in a model that may be complicated enough already, you have to add a column, add it to the table in the report, make sure you click "Don't Summarize" and then go through the the fun process of hiding it. Of course, you should remember to document the whole process for the benefit of those who are going to maintain the model after you.

I don't know if that's what you're refering to as unnecessary gymnastics but I can't think of any simpler alternative.


A simpler alternative would be to just make sorting optional - as in adding "Don't Sort" just under "Don't Summarize"...

Frequent Visitor
Posts: 9
Registered: ‎07-06-2018

Re: How Do I Sort By Source File, Not Alphabetical?

Hi @KHorseman,

 

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.