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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
ericjo
Helper III
Helper III

How to handle merged cells in Excel in Power BI

ericjo_1-1760416160207.png

I'm trying to develop a report by loading an Excel file with merged cells (by year and month) into Power BI.

When I load the Excel data, the merged cells are marked as Null, and I don't know how to fill them in before pivoting.

 

I want to configure it in the following format.

ericjo_0-1760416209061.png

 

1 ACCEPTED SOLUTION
danextian
Super User
Super User

Hi @ericjo 

This is more than just merged cells but a case of nested hierarchy as well. You would need to combine the upper and lower hierarchy and use that as the column names, unpivot and then split the combine hierarchy names.  There's also a need to fill down due to merged cells.  This isn't exactly for beginners but try the attached files.

danextian_0-1760420893240.png

danextian_1-1760420900956.png

danextian_2-1760420924033.png

 

 





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

1 REPLY 1
danextian
Super User
Super User

Hi @ericjo 

This is more than just merged cells but a case of nested hierarchy as well. You would need to combine the upper and lower hierarchy and use that as the column names, unpivot and then split the combine hierarchy names.  There's also a need to fill down due to merged cells.  This isn't exactly for beginners but try the attached files.

danextian_0-1760420893240.png

danextian_1-1760420900956.png

danextian_2-1760420924033.png

 

 





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.

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors