Forum Discussion

dgwilson's avatar
dgwilson
Icon for Responsive Resident rankResponsive Resident
3 days ago
Solved

Matrix? Report Design

I have an ask from the business where the report output has a strict prescribed format (see the headings below).
This is a financial report with a structured hierarchy on the left hand side. This lends itself easily to being a Matrix with row totals etc.

If I look past the layered headings I could go with just the bottom line, fix the column widths and overlay a fixed graphic. That sucks but would do the job and as I type I'm convincing myself it would be the the easiest approach.
My other consideration was to go quite extreme and build a custom matrix visual - I'm not sure taking on that amount work (even if AI did most of the heavy lifting) would be a good idea.

I'm wondering what the community thinks about this.

 

  • Ive built structures like this before with just the standard matrix visual.  The trick here is you need a headings table. That table just has your "MONTH", "YEAR TO DATE", "FULL YEAR" headings and has not relationships to your other tables in your model.  Create a sort by column too.  Take the header column from this table and put it into the "Columns" section in your matrix, it will serve as a main heading.

    Next build a measure for each 2nd level heading i.e. "Forecast", "Forecast Variance" etc.  Each of those measures has a switch statement to change what calculation is used depending on what heading it finds itself under.  Ie:  SWITCH(Headings[Header], "MONTH", [MTD Calc], "YEAR TO DATE", [YTD Calc].....<rest of code> 

    The only limitation is that you will get all chosen sub headings for each main heading, so you might want to repurpose some of those for main headings (like full year) that have slightly different calculations you want in a similar position.

7 Replies

  • dgwilson's avatar
    dgwilson
    Icon for Responsive Resident rankResponsive Resident

    That's been a really useful ride.

    Here is the original.

    Here are the Budget and Forecast results.

     

    This is the table that is driving the column headings in the Matrix



    And this is the measure that is in each Matrix cell.



    It takes a bit of work to render the page... that's the penality for the explicit formatting.

    Thank you for the assistance and guidance team. Nice work. I hope this will benefit someone else at some point.

    - David

  • dgwilson's avatar
    dgwilson
    Icon for Responsive Resident rankResponsive Resident

    Thank you. Thank you to all that have taken the time to reply here it is really appreciated. I agree with the push back on the strict formatting... I've been trying. While I have a number of years of Power BI experience... I do not have the experience in paginated reports - I appreciate the input and will try and stay away from that for now. I like the disconnected table idea and indeed have done that for other things .. not in a Matrix though. I'll experiment with that and see where it takes me.

  • dgwilson's avatar
    dgwilson
    Icon for Responsive Resident rankResponsive Resident

    Also.. apologies that this system doesn't allow me to accept multiple replies as solution. Everyone contributed. Thank you.

  • Ive built structures like this before with just the standard matrix visual.  The trick here is you need a headings table. That table just has your "MONTH", "YEAR TO DATE", "FULL YEAR" headings and has not relationships to your other tables in your model.  Create a sort by column too.  Take the header column from this table and put it into the "Columns" section in your matrix, it will serve as a main heading.

    Next build a measure for each 2nd level heading i.e. "Forecast", "Forecast Variance" etc.  Each of those measures has a switch statement to change what calculation is used depending on what heading it finds itself under.  Ie:  SWITCH(Headings[Header], "MONTH", [MTD Calc], "YEAR TO DATE", [YTD Calc].....<rest of code> 

    The only limitation is that you will get all chosen sub headings for each main heading, so you might want to repurpose some of those for main headings (like full year) that have slightly different calculations you want in a similar position.

  • Hi dgwilson​ 

    A native Power BI Matrix can support this type of layout, but the structure needs to be modeled explicitly.

    Create a disconnected layout table that defines the required column hierarchy, for example:

    • Month
    • Year to Date
    • Full Year

    and the corresponding subcategories such as Actual, Forecast, Variance and Variance %.

    Use those fields in the Matrix column hierarchy, and create a dynamic measure that returns the appropriate calculation based on the selected item from the disconnected table.

    If the same calculation patterns are reused across multiple periods or scenarios, calculation groups can be used to centralize and simplify that logic.

    This approach allows the required reporting structure to be reproduced while still using the native Matrix visual.

    Another option is to use a financial reporting visual from AppSource, such as Inforiver Reporting Matrix, which provides more flexibility for complex financial layouts and formatting. This is a paid solution.

    Building a custom visual is generally not required for this scenario unless there are additional layout or interaction requirements that cannot be achieved with the native Matrix or an existing AppSource visual.

    If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly.



  • Hi dgwilson​, unlike the fellows here, I don't think it's possible to replicate it 1-to-1. Simply looking at the violet "Mth" which is merged on 2 rows... You might get "Mth" in the second row and an empty cell in the 3rd row...

    Real suggestion? Work with your business users to find the best way to visualize this data without restricting yourself to this exact view. Build something similar, and add extra value they didn't have in Excel before (some graphs, colorful SVG, etc.).

    Wanna exactly this one? Use Excel ;) Connect it to the semantic model so all downstream Excel files read the same numbers, while leveraging Excel's flexibility to build custom tables.

    My honest suggestion: don't waste your time pulling Power BI to that Excel table. It will bring so much headache and waste of time that the final similar result isn't worth the time invested.

    Good luck with your project! :)

  • ShivekMaharaj's avatar
    ShivekMaharaj
    Icon for Community Champion rankCommunity Champion

    Hi dgwilson​,

    I would probably make the decision based on how strict “strict prescribed format” really is.

    If the business mainly needs the same information and hierarchy, then I agree with the suggestions above that the native Matrix is worth trying first.

    The newer Matrix formatting options support hierarchical column headers, fixed/custom column widths and more granular width control, so you can get reasonably close without building a custom visual.

    However, if the requirement is genuinely:

    “this financial statement must look exactly like the supplied layout”

    then I would seriously consider a Paginated Report rather than forcing the standard Matrix to behave like Excel.

    Microsoft positions Paginated Reports specifically for highly formatted, print-ready layouts where precise positioning and repeatable output matter.

    They also support matrix-style row and column groups, including nested dynamic groups and static headers, which maps quite naturally to a structure such as:

    Month
    -> Mth
    -> Forecast
       -> Fcast
       -> Var
       -> %
    
    Year to Date
    -> Mth
    -> Forecast
       -> Fcast
       -> Var
       -> %
    
    Full Year
    -> Fcast
    -> VPY
       -> PY
       -> Var
       -> %

    The native Matrix can absolutely model that hierarchy, but there are still formatting limitations around independently styling hierarchy levels and column headers.

    Microsoft documents some of those Matrix limitations including limited header formatting and a maximum of 100 visible columns.

    So my approach would be:

    If interactivity is most important
    -> native Matrix + disconnected layout table / calculation groups
    
    If exact financial-statement layout is most important
    -> Paginated Report
    
    If both are needed
    -> use the normal Power BI report for analysis and a Paginated Report for the prescribed financial output

    Microsoft also supports publishing both report types in the same workspace/app, so they do not have to be mutually exclusive.

    I would only build a custom visual if neither the Matrix nor Paginated Reports can meet a specific interaction requirement.

    AI-assisted drafting: AI was used to help structure and phrase this response. I reviewed and validated the technical content before posting.