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
Dawn7047
Frequent Visitor

How to combine a certain selected number of columns in a table into a single column in Power BI?

I have a raw data file as shown below:

 

dummy file raw data.PNG

 

 

There are 5 columns (D1-D5) which denote the number of orders bought in each of the five days of the week.

 

I want to combine these 5 columns into a single one without changing the data values in any way. To do that I tried to use the Transform>Transpose option in Power Query but the results were as follows:

 

Transpose.PNG

 

 

 

I want to rework the table such that the data and columns are arranged as follows:

 

dummy file reworked data.PNG

 

 

I want one column to denote the day of the week on which the order from each product was taken and the other column to denote the number of orders. Does anyone know how to do so in Power BI or Power Query?

1 ACCEPTED SOLUTION
AlB
Super User
Super User

Hi @Dawn7047 

You just need to unpivot the columns in Power Query. Check:

https://support.microsoft.com/en-us/office/unpivot-columns-power-query-0f7bad4b-9ea1-49c1-9d95-f5882...

 or share the input table in text-tabular format instead of on a screen cap so that contents can be copied and  solution can be provided.

 

SU18_powerbi_badge

Please accept the solution when done and consider giving a thumbs up if posts are helpful. 

Contact me privately for support with any larger-scale BI needs, tutoring, etc.

 

View solution in original post

1 REPLY 1
AlB
Super User
Super User

Hi @Dawn7047 

You just need to unpivot the columns in Power Query. Check:

https://support.microsoft.com/en-us/office/unpivot-columns-power-query-0f7bad4b-9ea1-49c1-9d95-f5882...

 or share the input table in text-tabular format instead of on a screen cap so that contents can be copied and  solution can be provided.

 

SU18_powerbi_badge

Please accept the solution when done and consider giving a thumbs up if posts are helpful. 

Contact me privately for support with any larger-scale BI needs, tutoring, etc.

 

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.

Top Solution Authors
Top Kudoed Authors