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.
Dear all,
I have a table with many columns, and I need to sort them. Target is for me to speed up the grouping step, and I read some resoucres in the web that Grouping can be faster if the data are pre-sorted.
Coming back to the sorting, is there a way to make it in one step intead of making it for each column?
What I did on sample file is this one:
#"Sorted Rows" = Table.Sort(#"Removed Columns",{{"Region", Order.Ascending}, {"Port_Type_1_2", Order.Ascending}})
I was thinking of using the following:
Headers = Table.ColumnNames(StuffingBoxChange2),
HeadersToRemove = List.Combine({{"Y3"},{"OEM_Y3_Volumes"},{"DISTRIBUTOR_Y3_Volumes"}}),
HeaderDifference = List.Difference(Headers,HeadersToRemove),
and at the end using HeaderDifference to select the column to sort.
Could you support?
Thanks.
Solved! Go to Solution.
Hi @Mic1979
#"Sorted Rows" = Table.Sort(#"Removed Columns", List.Transform(HeaderDifference, each {_, Order.Ascending}))
Stéphane
Hi @Mic1979
#"Sorted Rows" = Table.Sort(#"Removed Columns", List.Transform(HeaderDifference, each {_, Order.Ascending}))
Stéphane
Thanks!
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 |
---|---|
15 | |
12 | |
8 | |
8 | |
7 |
User | Count |
---|---|
15 | |
13 | |
9 | |
7 | |
6 |