Public Schedule Face-to-Face & Online Instructor-Led Training - View dates & book

convert section data set

Forum home » Delegate support and help forum » Microsoft Excel Training and help » Convert a section in a data set in Power Q into a list format

Convert a section in a data set in Power Q into a list format

ResolvedVersion 365

Douglas has attended:
Excel Intermediate course
Excel Power Query course
Excel Advanced course

Convert a section in a data set in Power Q into a list format

I'm trying to convert a section within my data set in Power Q into a list format. The data now is formatted as months in a rows and the cost in columns. How would I go about doing so?

RE: convert a section in a data set in Power Q into a list forma

Hello Douglas,

Thank you for your question. In Power Query, you have a powerful tool called 'Unpivot'.

To convert your data in Power Query from a matrix format (months in rows and costs in columns) into a list format (also known as unpivoting), you can follow these steps:

Load your data into Power Query

In Excel: Select your data → go to the Data tab → click From Table/Range.

Your data currently looks something like this:

Month | Cost A | Cost B | Cost C
Jan | 100 | 200 | 300
Feb | 110 | 210 | 310

To unpivot the cost columns:

Select all the cost columns (e.g., "Cost A", "Cost B", "Cost C").
Right-click on the selected columns and choose Unpivot Columns.
Rename the columns:

Power Query will rename the columns to something like:

Month | Attribute | Value
Jan | Cost A | 100
Jan | Cost B | 200
Jan | Cost C | 300

You can rename:

Attribute → Cost Type
Value → Amount (or whatever fits your context)

Close & Load:

Click Close & Load to return the transformed data to Excel.

I hope this will be helpful to you.

Please let us know if you need some more assistance.

Kind regards
Marius Barnard
STL

RE: convert a section in a data set in Power Q into a list forma

This was a good tips, unfortunately my data set was a bit messy to perform it this way, managed to find a alternative solution.

Mon 26 May 2025: Automatically marked as resolved.

Excel tip:

Counting Non Number Cells (Text)

If you try to use the COUNT FUNCTION =COUNT(Cell range)with a range of cells with numbers and or containing text fields you wil find that that the text cells will be excluded from the the count. If you want to include them try the the COUNTA FUNCTION =COUNTA(Cell range). This counts both text and number cell values.

View all Excel hints and tips

Connect with us:

0207 987 3777

Call for assistance

Request Callback

We will call you back

Server loaded in 0.11 secs.