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
Anonymous
Not applicable

How would I take multiple columns and combine them into a single column?

I have reports sent to me from various sources with columns for each month of the year. I would like to take said columns and combine them all into a single column programmatically and associate the month from which they originated with them.

 

Sample.png

 

Is there an easy way to do this? I see the "Convert to List" feature, but I can't figure out how to do this for all columns without having to create separate queries for each. I am also unsure how I go about recombining them.

1 ACCEPTED SOLUTION
MarcoRotta
Resolver I
Resolver I

Hi pbiuser2.

 

 

What you probably want here is to unpivot those months columns and turn them into a single column. Your data model will probably not work fine with them pivoted as they are. I've found this blog post with detailed instructions on how to do it. Take a look. The first part of the post deals with pivoting, so please roll to the middle of the article to find the unpivotting topic. 

 

 

Regards. 

View solution in original post

2 REPLIES 2
MarcoRotta
Resolver I
Resolver I

Hi pbiuser2.

 

 

What you probably want here is to unpivot those months columns and turn them into a single column. Your data model will probably not work fine with them pivoted as they are. I've found this blog post with detailed instructions on how to do it. Take a look. The first part of the post deals with pivoting, so please roll to the middle of the article to find the unpivotting topic. 

 

 

Regards. 

Anonymous
Not applicable

@MarcoRotta, that is brilliant! 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.