Forum Discussion

gomezc73's avatar
gomezc73
Helper V
3 years ago
Solved

How Convert an excel data in transpose

Hi Experts,

 

I have a issue with a excel file with the following format:

 

You can see that there are a column by quarter/Product code

CodeDescriptionMar-23Jun-23Sep-23Dec-23Mar-24Jun-24Sep-24Dec-24Mar-25Jun-25Sep-25
A01A002Red Car             10.00       12.00       14.00       16.00       18.00       20.00       22.00       24.00       26.00       28.00       30.00
A01A006Blue Car             20.00       22.50       25.00       27.50       30.00       32.50       35.00       37.50       40.00       42.50       45.00
A01A005Green Car             23.00       24.00       25.00       26.00       27.00       28.00       29.00       30.00       31.00       32.00       33.00
A01A026Black Car             45.00       47.60       50.20       52.80       55.40       58.00       60.60       63.20       65.80       68.40       71.00
A01A007Yellow Car             32.00       30.00       28.00       26.00       24.00       22.00       20.00       18.00       16.00       14.00       12.00
A01A027Pink Car             12.00         7.00         2.00        (3.00)        (8.00)      (13.00)      (18.00)      (23.00)      (28.00)      (33.00)      (38.00)

 

and i need transform the format in something like this, where there are several rows by the same product code, 1 row by date/Amount

 

CodeDescriptionDateAmount
A01A002Red CarMar-23       10.00
A01A002Red CarJun-23       12.00
A01A002Red CarSep-23       14.00
A01A002Red CarDec-23       16.00
A01A002Red CarMar-24       18.00
A01A002Red CarJun-24       20.00
A01A002Red CarSep-24       22.00
A01A002Red CarDec-24       24.00
A01A002Red CarMar-25       26.00
A01A002Red CarJun-25       28.00
A01A002Red CarSep-25       30.00
A01A006Blue CarMar-23       20.00
A01A006Blue CarJun-23       22.50
A01A006Blue CarSep-23       25.00
A01A006Blue CarDec-23       27.50
A01A006Blue CarMar-24       30.00
A01A006Blue CarJun-24       32.50
A01A006Blue CarSep-24       35.00
A01A006Blue CarDec-24       37.50
A01A006Blue CarMar-25       40.00
A01A006Blue CarJun-25       42.50
A01A006Blue CarSep-25       45.00

 

 

Is it Possible?

 

I really appreciate your help

 

Regards

  • Hello gomezc73 

    You can use unpivot in power query to achieve this. Select all the columns expect code, description and do unpivot selected columns as below.

    Let me know if this helps!

    If this post helps, then please consider Accept it as the solution to help the others find it more quickly. Appreciate you kudos!!

2 Replies

  • NaveenGandhi's avatar
    NaveenGandhi
    Memorable Member

    Hello gomezc73 

    You can use unpivot in power query to achieve this. Select all the columns expect code, description and do unpivot selected columns as below.

    Let me know if this helps!

    If this post helps, then please consider Accept it as the solution to help the others find it more quickly. Appreciate you kudos!!