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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
Anonymous
Not applicable

How to make header of report as column in report while loading

Hi Team,

Have input file like bellow.

capture20210628102626481.png

 

i need output as bellow in power BI

capture20210628102743834.png

 

How to achive above output in Power BI

4 REPLIES 4
Anonymous
Not applicable

The easiest solution is to import the data for 4 region in separate queries, add a column named "Region" to all 4 and then append the data back.

 

Steps -

1. Import Query 1 - Keep first 4 columns (Africa) & remove other columns, add new column named "Region" with value "Africa"

   Import Query 2 - Keep columns 6-9 (US) & remove others, add new column named "Region" with value "US"

  Import Query 3 - Keep columns 11-14 (Asia) & remove others, add new column named "Region" with value "Asia"

  Import Query 4 - Keep columns 16-19 (Europe) & remove others, add new column named "Region" with value "Europe"

 

2. Now Append the 4 queries created in step 1.

 

P.s. please make sure same data type is selected for same columns across 4 queries

 

Hope this helps.

Anonymous
Not applicable

Thanks for quick response.

Have one more query, is their any option to split columns auotomatically and apped query isted of manual column split and append

Anonymous
Not applicable

Try this -

 

1. Keep region names above the first column. i.e. "US" should be in the cell right above "Order Date"

2. Import the file into Power query

3. Remove the blank columns between regions

4. Go to 'Transform' tab and click "Transpose"

5. Promote 'First row as headers'

6. Rename first column as 'Region'

7. select first column, go to "Transform" tab, click "Fill" option and select Fill "Down". This will populate the regions

8. Select first 3 columns (other than those which have date as column name), then right click on selected column and select "Unpivot other columns"

 

This should arrive you at the desired format. Then you can rename all columns as required.

 

amitchandak
Super User
Super User

@Anonymous ,

You have a few options. But it better to do outside power bi.

 

Create 4 copies of this excel. in 1st one keep the first 4 columns remove the other. In 2nd one keep the next 4 columns and remove the others. Select the 4 right-click sn use remove other .

 

Append these 4 tables.

 

Another option is in this blog

https://kohera.be/blog/power-bi/how-to-unpivot-twice/

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.