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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Unpivot Only Select Columns In a Table

Hi,

 

I have a single table with roughly 50 columns. I need to Unpivot 26 of these columns, but doing so in the original table is going to cause problems for some measures and calculated columns I already have set up.

 

So the question is, can I possibly "extract" those 26 columns (plus a primary key column) to a separate table that I can then unpivot? I have seen some potential solutions using M, but nothing that fully addressed my situation.

 

Hoping I can do this programatically and not build out an entirely new database table to pull into PowerBI. Happy to answer any questions or provide additional context as needed. Thanks as always!

1 ACCEPTED SOLUTION
Vijay_A_Verma
Super User
Super User

Right click on original table - Reference - This references to the last step in original table and produce a copy. Then in this, you can do your unpivoting in this new table.

View solution in original post

3 REPLIES 3
Vijay_A_Verma
Super User
Super User

Right click on original table - Reference - This references to the last step in original table and produce a copy. Then in this, you can do your unpivoting in this new table.

Anonymous
Not applicable

Nice...once I make the copy, can I remove the columns I don't need in the new table before using Unpivot?

Whatever you do in new table will not impact the original table. Whatever is the last step result in original table, that is the starting point for new table. 

The relationship is from old to new table not vice versa. 

So, remove / add or do whatever you want to do will have no bearing on the original table. 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors