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

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register Now

Reply
Mo_15797
Regular Visitor

Convert Data in Power BI

Hi,

 

I currently have a dataset in excel (yellow table in the image below). I would like to know if there's a way to convert it to create a column for each hierarchy, for example, see the green table on the image. I currently do this manually in excel, but I have a dataset which is very large so wanted to find out if there's an easier way to do this in Power BI?

 

Mo_15797_1-1695052989196.png

 

1 ACCEPTED SOLUTION
Mo_15797
Regular Visitor

Hi @KEAlexander - Thanks for your response. I managed to get it to work after watching a few youtube videos. I used the Pivot function on the "hierarchy" column to create the new columns, and then selected the "title" column on the Value Column. I configured the settings on the "Advanced options" on this pivot function to "Do not aggregate" so it shows me the values in non-numerical format. 
I then used the "Fill up" and "Fill down" function to populate the fields in the table where it was necessary. 

View solution in original post

2 REPLIES 2
Mo_15797
Regular Visitor

Hi @KEAlexander - Thanks for your response. I managed to get it to work after watching a few youtube videos. I used the Pivot function on the "hierarchy" column to create the new columns, and then selected the "title" column on the Value Column. I configured the settings on the "Advanced options" on this pivot function to "Do not aggregate" so it shows me the values in non-numerical format. 
I then used the "Fill up" and "Fill down" function to populate the fields in the table where it was necessary. 

KEAlexander
Helper I
Helper I

In the report builder side of Power Bi desktop, try pivot and unpivot. There are several options, and one might work for you. Since your data is coming from Excel and pivot is available in Excel, you could try it out there first if Excel is more comfortable to work in to try out approaches. 

Helpful resources

Announcements
Fabric Community Conference

Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

February 2024 Update Carousel

Power BI Monthly Update - February 2024

Check out the February 2024 Power BI update to learn about new features.

Fabric Career Hub

Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

Fabric Partner Community

Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.