Table of Contents
&Reorder multiple columns using drag and drop
Another way to reorder columns in Power Query
Home Computer Tutorials Computer Knowledge How to reorder multiple columns in Power Query via drag and drop

How to reorder multiple columns in Power Query via drag and drop

Mar 14, 2024 am 10:55 AM
sort query arrangement power

In this article, we will show you how to reorder multiple columns in Power Query by dragging and dropping. Often, when importing data from various sources, columns may not be in the desired order. Reordering columns not only allows you to arrange them in a logical order that suits your analysis or reporting needs, it also improves the readability of your data and speeds up tasks such as filtering, sorting, and performing calculations.

如何通过拖放在Power Query中对多列进行重新排序

How to rearrange multiple columns in Excel?

In Excel, there are many ways to rearrange columns. You can simply select the column header and drag it to the desired location. However, this approach can become cumbersome when dealing with large tables with many columns. To rearrange columns more efficiently, you can use the enhanced query editor. With the enhanced query editor, you can easily select multiple columns in the order you need and drag them together to the desired location. This allows you to quickly rearrange columns in large tables without having to constantly drag and scroll. The enhanced query editor provides a more convenient way to manage and adjust the order of columns, making your work more efficient and convenient.

How to reorder multiple columns in Power Query using drag and drop functionality

To reorder multiple columns in Power Query via drag and drop, you must perform the following steps:

Suppose we have a sample data source as shown below. So our first step is to open it in the Power Query editor. Select the data source and click the From table/range option in the Get data section under the Data tab.

如何通过拖放在Power Query中对多列进行重新排序

&Reorder multiple columns using drag and drop

After opening data in the Enhanced Query Editor, you can customize the display order by holding down the Ctrl key and selecting the desired columns. For example, you can rearrange DepartmentID and EmployeeID to suit your needs. This flexibility allows you to easily adjust the order of data display to suit your specific needs and preferences.

Department ID, employee ID, employee name, joining date, gender, salary code

I will select them in the order shown in the screenshot below:

如何通过拖放在Power Query中对多列进行重新排序

After selecting the columns, click and hold the left mouse button on any selected column header, then drag the pointer to where you want to place the column. Release the mouse button to drop the column to its new location. They will be rearranged in the desired order.

如何通过拖放在Power Query中对多列进行重新排序

Finally, click the Close&Load button in the top menu of the Power Query editor to apply the changes and load the reordered data back into the worksheet.

如何通过拖放在Power Query中对多列进行重新排序

Note:

  • If you want to rearrange all columns in the data source, you must drag the selection to the right of the last column and release the mouse button. If you drag the column to the left, nothing happens.
  • To reverse the order of columns in the data source, select the last column, hold down the Shift key, and then select the first column. Then click and hold the left mouse button on the last column header and drag the pointer to the right. Release the mouse button and the column order will be reversed. You can follow the same steps to reverse the order of just a few columns. This also allows the selection to be dragged to the left.
  • To "Undo" a reordering, right-click on the "Reordered Columns" step under "Applied Steps" in the query settings panel on the right and select "Delete".
  • Another way to reorder columns in Power Query

    When you reorder columns in Power Query, a Table.ReorderColumns function is created. You can also reorder multiple columns at once by modifying the formula text in the Table.ReorderColumns function. ReorderColumns function (if you cannot see this function, right-click on any column header and select Move > Left/Right/To Begin/to End from the context menu).

    Edit the formula text by placing your cursor on the top formula bar and typing the column headings in the desired order. Titles are enclosed in double quotes and separated by commas. Delete the previous entry for the added column and press Enter to apply the changes.

    This is how to quickly reorder multiple columns in Power Query without having to move each column individually. I hope you'll find this useful.

    The above is the detailed content of How to reorder multiple columns in Power Query via drag and drop. For more information, please follow other related articles on the PHP Chinese website!

    Statement of this Website
    The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

    Hot AI Tools

    Undresser.AI Undress

    Undresser.AI Undress

    AI-powered app for creating realistic nude photos

    AI Clothes Remover

    AI Clothes Remover

    Online AI tool for removing clothes from photos.

    Undress AI Tool

    Undress AI Tool

    Undress images for free

    Clothoff.io

    Clothoff.io

    AI clothes remover

    AI Hentai Generator

    AI Hentai Generator

    Generate AI Hentai for free.

    Hot Article

    R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
    3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
    R.E.P.O. Best Graphic Settings
    3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
    R.E.P.O. How to Fix Audio if You Can't Hear Anyone
    3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
    WWE 2K25: How To Unlock Everything In MyRise
    3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

    Hot Tools

    Notepad++7.3.1

    Notepad++7.3.1

    Easy-to-use and free code editor

    SublimeText3 Chinese version

    SublimeText3 Chinese version

    Chinese version, very easy to use

    Zend Studio 13.0.1

    Zend Studio 13.0.1

    Powerful PHP integrated development environment

    Dreamweaver CS6

    Dreamweaver CS6

    Visual web development tools

    SublimeText3 Mac version

    SublimeText3 Mac version

    God-level code editing software (SublimeText3)

    What are the top ten virtual currency trading platforms? Ranking of the top ten virtual currency trading platforms in the world What are the top ten virtual currency trading platforms? Ranking of the top ten virtual currency trading platforms in the world Feb 20, 2025 pm 02:15 PM

    With the popularity of cryptocurrencies, virtual currency trading platforms have emerged. The top ten virtual currency trading platforms in the world are ranked as follows according to transaction volume and market share: Binance, Coinbase, FTX, KuCoin, Crypto.com, Kraken, Huobi, Gate.io, Bitfinex, Gemini. These platforms offer a wide range of services, ranging from a wide range of cryptocurrency choices to derivatives trading, suitable for traders of varying levels.

    How to adjust Sesame Open Exchange into Chinese How to adjust Sesame Open Exchange into Chinese Mar 04, 2025 pm 11:51 PM

    How to adjust Sesame Open Exchange to Chinese? This tutorial covers detailed steps on computers and Android mobile phones, from preliminary preparation to operational processes, and then to solving common problems, helping you easily switch the Sesame Open Exchange interface to Chinese and quickly get started with the trading platform.

    What are the safe and reliable digital currency platforms? What are the safe and reliable digital currency platforms? Mar 17, 2025 pm 05:42 PM

    A safe and reliable digital currency platform: 1. OKX, 2. Binance, 3. Gate.io, 4. Kraken, 5. Huobi, 6. Coinbase, 7. KuCoin, 8. Crypto.com, 9. Bitfinex, 10. Gemini. Security, liquidity, handling fees, currency selection, user interface and customer support should be considered when choosing a platform.

    Top 10 virtual currency trading platforms 2025 cryptocurrency trading apps ranking top ten Top 10 virtual currency trading platforms 2025 cryptocurrency trading apps ranking top ten Mar 17, 2025 pm 05:54 PM

    Top Ten Virtual Currency Trading Platforms 2025: 1. OKX, 2. Binance, 3. Gate.io, 4. Kraken, 5. Huobi, 6. Coinbase, 7. KuCoin, 8. Crypto.com, 9. Bitfinex, 10. Gemini. Security, liquidity, handling fees, currency selection, user interface and customer support should be considered when choosing a platform.

    Top 10 cryptocurrency trading platforms, top ten recommended currency trading platform apps Top 10 cryptocurrency trading platforms, top ten recommended currency trading platform apps Mar 17, 2025 pm 06:03 PM

    The top ten cryptocurrency trading platforms include: 1. OKX, 2. Binance, 3. Gate.io, 4. Kraken, 5. Huobi, 6. Coinbase, 7. KuCoin, 8. Crypto.com, 9. Bitfinex, 10. Gemini. Security, liquidity, handling fees, currency selection, user interface and customer support should be considered when choosing a platform.

    Which of the top ten virtual currency trading apps is the best? Which of the top ten virtual currency trading apps is the most reliable Which of the top ten virtual currency trading apps is the best? Which of the top ten virtual currency trading apps is the most reliable Mar 19, 2025 pm 05:00 PM

    Top 10 virtual currency trading apps rankings: 1. OKX, 2. Binance, 3. Gate.io, 4. Kraken, 5. Huobi, 6. Coinbase, 7. KuCoin, 8. Crypto.com, 9. Bitfinex, 10. Gemini. Security, liquidity, handling fees, currency selection, user interface and customer support should be considered when choosing a platform.

    Recommended safe virtual currency software apps Top 10 digital currency trading apps ranking 2025 Recommended safe virtual currency software apps Top 10 digital currency trading apps ranking 2025 Mar 17, 2025 pm 05:48 PM

    Recommended safe virtual currency software apps: 1. OKX, 2. Binance, 3. Gate.io, 4. Kraken, 5. Huobi, 6. Coinbase, 7. KuCoin, 8. Crypto.com, 9. Bitfinex, 10. Gemini. Security, liquidity, handling fees, currency selection, user interface and customer support should be considered when choosing a platform.

    How to calculate c-subscript 3 subscript 5 c-subscript 3 subscript 5 algorithm tutorial How to calculate c-subscript 3 subscript 5 c-subscript 3 subscript 5 algorithm tutorial Apr 03, 2025 pm 10:33 PM

    The calculation of C35 is essentially combinatorial mathematics, representing the number of combinations selected from 3 of 5 elements. The calculation formula is C53 = 5! / (3! * 2!), which can be directly calculated by loops to improve efficiency and avoid overflow. In addition, understanding the nature of combinations and mastering efficient calculation methods is crucial to solving many problems in the fields of probability statistics, cryptography, algorithm design, etc.

    See all articles