Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
gomezc73
Helper IV
Helper IV

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

1 ACCEPTED SOLUTION
NaveenGandhi
Super User
Super User

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.

NaveenGandhi_0-1686049213007.png

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!!

View solution in original post

2 REPLIES 2
NaveenGandhi
Super User
Super User

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.

NaveenGandhi_0-1686049213007.png

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!!

Worked perfect. Thank you!!!

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.