From the course: Excel Power Query Tips and Techniques

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Sorting in Power Query

Sorting in Power Query

From the course: Excel Power Query Tips and Techniques

Start my 1-month free trial

Sorting in Power Query

- [Instructor] Here we have some data that we would like to sort by three levels, first by Session, then by Course, then by Last Name. In native Excel, we have an interface that helps us with that. We can add levels, all right, but we cannot do that in Power Query. So let me show you how this is done, all right. Let's get into Power Query from Table slash Range. Now here is our data, and you can see the sort options are very simple, ascending or descending. That's all. So how do we sort by levels? We have to do it in order. We want to sort first by Session, ascending, and then by Course, ascending, and then by Last Name, ascending. So you noticed, when we sorted Session and then sorted course, the Session stayed sorted, and then we moved on to the Last Name. So we got exactly what we wanted. We've sorted by three levels, Session, Course, and Last Name, and that's how you sort by levels in Power Query.

Contents