Forum Discussion
v4anand18
8 years agoAdvocate I
Sorting a table using multiple columns
Hi All, Is it possible to sort a table using multiple columns? My table looks like this and i would like to sort by "Year" first and then by "Month". Is it possible?
- 4 years ago
I see this tread is quite old, but sorting a visual by one column and then a second column is as simple as clicking the 1st column header to sort ascending or decending. Then simply hold the <Shift> key down and click on the header of the second column.
Of course you can just keep the <Shift> pressed and click on a 3rd, 4th etc until happy.
I hope this helps.
Steve B
Doyin
6 years agoNew Member
Hi all! Is it possible to sort a table by multiple columns using "contain" in Power Query?
- Hennadii6 years agoHelper IV
Hi Doyin , use expression like this
= Table.Sort(#"Previous Step",{{"Column1", Order.Ascending}, {"Column2", Order.Ascending}})- Anonymous3 years agoNot applicable
Well, actually, this answer, wouldn't it be useful in Power Query instead of the question? I don't mean to be rude, but I'm new and I don't know how to apply the answer in the question. Thanks in advance.