Forum Discussion
Printing Wide Matrices and First-Page Header in Power BI Report Builder
- 1 year ago
Hi prabavathym,
Power BI Report Builder uses a "hard page" PDF renderer. When a wide matrix can’t fit, the renderer slices it into chunks based on page width and height. By default, the PDF will step through chunks in a fixed order (left to right, then down). There isn’t a built-in "print all rows for the first N columns, then move to the next N columns" toggle like Tableau. To get Tableau-style output, you force the page breaks yourself by grouping the columns into "bands" (e.g., 20 columns per band) and adding a page break between those bands. For the header, the safest approach is to either hide the page-header contents after page 1, or move the "header" into the report body so it appears only on page 1.
Quick solution
1) Matrix pagination like Tableau (all rows for first 20 columns, then next 20)
- In your dataset, add a stable sort key for your dynamic columns (e.g., MonthStart, FieldOrder, etc.). Create two computed fields:
- ColIndex = row number over your column sort
- ColBand = 1 + (ColIndex - 1) / 20 (integer division)
SELECT ..., ROW_NUMBER() OVER (ORDER BY YourColumnSort) AS ColIndex, 1 + (ROW_NUMBER() OVER (ORDER BY YourColumnSort) - 1) / 20 AS ColBand FROM ...
- In the Column Groups pane, add a parent column group above your existing dynamic column group, grouped on =Fields!ColBand.Value.
- Select that parent column group and set a Page break "Between each instance of a group." Optional: set ResetPageNumber = True if you want each band to start at page 1.
- Keep your current column group inside the band. Set header repetition as needed so row/column headers repeat across pages.
Docs: Add page breaks (group instances), Repeat row/column headers, Renderer support.
2) Show the page header only on the first page
- Option A (fast): Keep the Page Header. Put all header content inside a rectangle. Set the rectangle’s Hidden expression to:
=IIF(Globals!PageNumber > 1, True, False)
This hides the contents after page 1. Note: the header space still reserves height on later pages (empty band). - Option B (cleanest layout): Remove the Page Header. Add a rectangle at the very top of the report body that contains your "header" content. Put a Page break after that rectangle so the main matrix starts on page 2. This way the header appears only on page 1 and no extra header space is reserved on later pages.
Docs: Hide header on first/last page. Example using Globals!PageNumber: Stack Overflow example.
If you found this helpful, consider giving some Kudos. If I answered your question or solved your problem, please mark this post as the solution.
- In your dataset, add a stable sort key for your dynamic columns (e.g., MonthStart, FieldOrder, etc.). Create two computed fields:
Hi prabavathym,
Just following up to see if the Response provided by community members were helpful in addressing the issue.
If one of the responses helped resolve your query, please consider marking it as the Accepted Solution. Feel free to reach out if you need any further clarification or assistance.
Best regards,
Prasanna Kumar