Can PowerQuery append rows based on columns?

Hello StackOverflow Community,

I have a Dataset where the monthly volume's values per Model is shown in multiple columns instead of one. I.E:

Model Jan Feb Mar Apr May

 A        5     12     26      56     23

Is it possible through PowerBI's PowerQuery to create one "Month" column where its values are being appended? Example:

Model Month Volume

 A         Jan        5

 A         Feb       12

 A         Mar       26

 A         Apr        56

 A         May       23

Thanks in advance.

Upvotes: 0

Views: 299

Answers (1)

Jon
Jon

Reputation: 4967

You need to use 'Unpivot columns', in the transform options of the query editor

Select the columns you want, then Unpivot. You should give you this:

enter image description here

It will name the new columns Attribute and Value, you can then rename them to what you want. FYI when the next month (Jun) is added to the source it should unpivot that column automatically.

Upvotes: 1

Related Questions