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

Level up your Power BI skills this month - build one visual each week and tell better stories with data! Get started

Reply
Mai_Nashaat
Helper II
Helper II

Read grouped columns of excel

hi guys,

 

I've an excel file with grouped columns as below:

Mai_Nashaat_0-1665915289419.png

I need to import it in power bi as below:

Mai_Nashaat_1-1665915363102.png

any help will be much appreciated please.

1 ACCEPTED SOLUTION
danextian
Super User
Super User

Hi @Mai_Nashaat ,

 

Power BI will read the worksheet as is and will not matter whether rows or columns  have been grouped. If you want to achieve a result similar to below, Power  BI needs to be able to identify which rows are  the main and subtotals. You can either do this via a conditional column or doing a merge with a table with data that indicates kind of total a row is.

danextian_0-1665967824555.png

danextian_1-1665967915894.png

 

After that, extra columns are created in PQ and total rows are removed. 

Attached is a sample pbix to help you get started.

 





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

View solution in original post

2 REPLIES 2
danextian
Super User
Super User

Hi @Mai_Nashaat ,

 

Power BI will read the worksheet as is and will not matter whether rows or columns  have been grouped. If you want to achieve a result similar to below, Power  BI needs to be able to identify which rows are  the main and subtotals. You can either do this via a conditional column or doing a merge with a table with data that indicates kind of total a row is.

danextian_0-1665967824555.png

danextian_1-1665967915894.png

 

After that, extra columns are created in PQ and total rows are removed. 

Attached is a sample pbix to help you get started.

 





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.
Shaurya
Memorable Member
Memorable Member

Hi @Mai_Nashaat,

 

You can do this by selecting these fields and using Unpivot Selected Columns.

 

Did I answer your question? Mark this post as a solution if I did!
Consider taking a look at my blog: Forecast Period - Previous Forecasts

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

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

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

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.