Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hi!
I have two columns, One is an index that I am trying to sort by. The other is calculated values.
Looks like this:
Column A:
Colum B:
I get the Sort by another column error that says We can't sort Column B by Column A. There can't be more than one value in Column A for the same Value in Column B.
Why would this be an issue? It is a straight list of numbers that increase by 1 each row?
0 appears twice in the second column. You can't sort that with 2 different numbers. Should 0 be the first thing in a list or the second? It would be impossible to tell if it's supposed to be sorted as both 1 and 2.
Proud to be a Super User!
I think I had the system backwards. I was thinking by selecting Column B I was sorting column B by the order of Column A.
I tried selecting Column A and sorting it by Column A and that didn't work.
I got it to work by sorting a category column instead. It was organizing the category titles alphabetically. >.<
It doesn't matter which order you select the columns in. There are repeat values in one column and different values in the other. If you're trying to impose a sort order the unique values must match. If I want to make the alphabet sort in reverse order I need this setup:
Value | SortOrder |
A | 26 |
B | 25 |
C | 24 |
D | 23 |
E | 22 |
F | 21 |
… | … |
What you have is the equivalent of this:
Value | SortOrder |
A | 26 |
B | 26 |
C | 25 |
D | 24 |
E | 23 |
F | 22 |
… | … |
Which should come first, A or B? It's impossible to tell from this. That's why you're getting that error.
The reverse would also be incorrect.
Value | SortOrder |
A | 26 |
A | 25 |
B | 24 |
C | 23 |
D | 22 |
E | 21 |
… | … |
Should A be number 26 or 25? Impossible.
Proud to be a Super User!
What was happening was that I was getting:
and
Because I had some other column with alphabetical categories that for some reason took precedence in the sort order.
The issue I was having was that I selected the numerical column and said "Sort by Index A" which was my ACDBE column. Thinking that it would work like excel and give me an alphabetically organized index in the column I selected.
What I needed to do was select the dominant column - the fruits and veggies for instance, and sort THAT by the index values instead.
The goal (and result) was to have a list in the order of:
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
72 | |
69 | |
55 | |
36 | |
31 |
User | Count |
---|---|
87 | |
62 | |
61 | |
49 | |
45 |