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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
marami21
Frequent Visitor

Stack one column under another column

I need to stack one column under another existing column. I have read that it can be done by unpivoting, in here, however, I do not understand how this is done. 

 

Thank you

1 ACCEPTED SOLUTION
Anonymous
Not applicable

@marami21 

I would do this - from the link post, copy paste the code to your advanced editor and look at one step at a time and see how is data changing with each step.

That way you learn and understand too.

 

Regards

View solution in original post

3 REPLIES 3
v-juanli-msft
Community Support
Community Support

Hi @marami21 

In addition to vmakhija's suggestion, you could copy the sample data in this thread as Source in Power BI by entering data, then copy and paste the code from step 2 ->#"Changed Type".

 

You could find how to use "unpivot columns /pivot columns" below:

https://radacad.com/pivot-and-unpivot-with-power-bi

 

Best Regards
Maggie

 

Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Anonymous
Not applicable

@marami21 

I would do this - from the link post, copy paste the code to your advanced editor and look at one step at a time and see how is data changing with each step.

That way you learn and understand too.

 

Regards

Anonymous
Not applicable

Hey, so try to follow these steps:

1. Open transform data

2. Select the columns you want to analyze and duplicate the query (to keep the original query unharmed)

3. In the new query, add a uniquie idetenfier column or an index column, choose the columns you want to stack, (dont choose the unique identifier of those entries/ or an index), and click on unpivot option. 

4. Click on save and close, and start making graphs. Now the variables will stack one beneath the other.

 

I hope this helps. 

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.