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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
PBIFanHook7
Helper II
Helper II

How to add section names as text boxes (which scrolls with the columns) to column headings?

I would like to add a section name to each group of columns. When scrolling the report (horizontally) I would like for the section names to move with each section's associated columns. Below is an example of the condensed report, each section is associated with specific columns. I am using text boxes for the sections but the text boxes don't move when scrolling. May be I shouldn't be using text boxes. Thanks in advance for all assistance. 

 

 

PBIFanHook7_0-1755651499531.png

 

1 ACCEPTED SOLUTION
danextian
Super User
Super User

Hi @PBIFanHook7 

 

You're using separate columns but sections/hierarchies are only possible with matrix.  Your data as separate columns insn't in the proper shape to achieve what you want. You will need to unpivot your table, add some indicator which  values belong to which rows (with an index column) and a custom column to identify which section the unpivoted column headers belong to and then add the fields to a matrix visual and make it appearl like a sectioned table.  That would be the general approach which might not be enough depending on the complexity of your data. Please see the attached sample pbix.

danextian_0-1755663321834.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

8 REPLIES 8
v-sshirivolu
Community Support
Community Support

Hi @PBIFanHook7 ,

I would also take a moment to thank @danextian  , for actively participating in the community forum and for the solutions you’ve been sharing in the community forum. Your contributions make a real difference.
 

I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions

I marked @danextian response as the solution. Thanks.

Shahid12523
Power Participant
Power Participant

In Power BI (Matrix visual):

Unpivot your columns in Power Query.

Use Matrix with a multi-level column header:

Section Name → Column Name → Value.

Shahed Shaikh
danextian
Super User
Super User

Hi @PBIFanHook7 

 

You're using separate columns but sections/hierarchies are only possible with matrix.  Your data as separate columns insn't in the proper shape to achieve what you want. You will need to unpivot your table, add some indicator which  values belong to which rows (with an index column) and a custom column to identify which section the unpivoted column headers belong to and then add the fields to a matrix visual and make it appearl like a sectioned table.  That would be the general approach which might not be enough depending on the complexity of your data. Please see the attached sample pbix.

danextian_0-1755663321834.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.

Think of a Power BI matrix viz as a very close relative of pivot tables in Excel. That, you can't do with pivot tables  unless your data in Excel is also  unpivoted. 





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.

@danextian , follow-up question, how may I change the background color and font color for Section 1, Section 2, and Section 3 and their respective columns. For example, I may want to make Section 1 red, Section 2 blue, and Section 3 green and make their columns the same color. Thanks. (I am not sure if I should make a new post.) 

Dane, thanks for the excellent response and solution. I thought Microsoft would make this a little bit simplier. 

ryan_mayu
Super User
Super User

@PBIFanHook7 

you can try to use grouping and binning , then display the grouping column

 

https://learn.microsoft.com/en-us/power-bi/create-reports/desktop-grouping-and-binning?wt.mc_id=DP-M...

 





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

Proud to be a Super User!




Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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