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

Try your skills in the Power BI Dataviz World Championship! Round one ends June 26. Join now

Reply
kandre123
Advocate I
Advocate I

unpivot tables

Hi, 

 

In my quest for flattening tbles i have need for some help. I have need for a way to unpivot a dataset with 310 columns The dataset is as follows

 

2 columns with Keys, rest is columns with values to be unpivoted and comes in batches of 10. So i have 10 columns with values defined by Revenue and year. Next batch is 10 columns by costs and year etc.  Each cell in this is a number value and getting one value column would be helpful.  The thing is that the last batch of 10 columns is currency with GBP, NOK,USD etc by year.

 

How would i unpivot these so as to not make duplicate values or getting currency nominator in the value field?

2 REPLIES 2
v-chuncz-msft
Community Support
Community Support

@kandre123 

 

You may take a look at the post below.

https://community.powerbi.com/t5/Desktop/Help-Unpivoting-data/m-p/259491#M115847

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

@v-chuncz-msft thank you for your input but this was a code snippet. Would that solve the problem if rewritten for 300 columns? I was wondering about the approach to do this and if it is a non-code writing way of doing this

Helpful resources

Announcements
Fabric Data Days is here Carousel

Fabric Data Days 2026

Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.

May Power BI Update Carousel

Power BI Monthly Update - May 2026

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

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.