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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.

Reply
msc7808
Regular Visitor

Data Import and unPivot

Hi There

 

I am new to PowerBI. My source data is sample sales breakdown of various categories. 

 

msc7808_0-1645394258018.png

 

I would like to unpivot and organize information vertically. Given few tries but didn't have success so far.

 

msc7808_1-1645394390557.png

 

Can someone please share their insight into this?

 

Thanks


Manny

 

1 ACCEPTED SOLUTION
wdx223_Daniel
Super User
Super User

NewStep=#table({"ID","Category","Quantity"},List.TransformMany(Table.ToRows(PreviousStep),each List.Split(List.Skip(_),2),(x,y)=>{x{0}}&y))

View solution in original post

2 REPLIES 2
v-jingzhang
Community Support
Community Support

Hi @msc7808 

 

Daniel has provided a perfect solution. You can copy his code into Advanced Editor to add a new step and replace "PreviousStep" with the last step name in your APPLIED STEPS pane like #"Changed Type". 

How to add a step or steps to an existing power query - YouTube

 

Best Regards,
Community Support Team _ Jing

wdx223_Daniel
Super User
Super User

NewStep=#table({"ID","Category","Quantity"},List.TransformMany(Table.ToRows(PreviousStep),each List.Split(List.Skip(_),2),(x,y)=>{x{0}}&y))

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors
Top Kudoed Authors