Forum Discussion

Elizabeth190803's avatar
Elizabeth190803
Frequent Visitor
11 months ago
Solved

How to create a table inside another table in Matrix with separate column headers

Hi everyone,

I’m building a Matrix visual in Power BI where each Vendor expands to show its Categories.


When I expand a Vendor, I’d like to see a header row called “Category” before the list of categories—essentially making each Vendor look like it contains a separate sub-table with its own column header.


Right now, when I expand a Vendor, the categories appear directly underneath without a header. I tried using a measure to display “Category,” but it repeats across multiple columns (under each employee_id/status column) instead of showing once as a row header.

  • Anonymous's avatar
    Anonymous
    11 months ago

    Hi Elizabeth190803 ,


    As Poojara_D12  mentioned, the built-in Matrix visual can’t insert a custom row header like “Category” under each Vendor the best you can do natively is simulate it (turn off stepped layout or use a UNION table).

    If you need it to work exactly as described (a true header row under each Vendor), you’ll need either:

    • Paginated Reports (RDL) these support group headers out of the box. You can group by Vendor, then insert a header row labelled “Category” before listing the categories.
    • Or a custom visual such as Inforiver Matrix or Xviz Matrix, which provide nested headers and table-within-table formatting that the native Matrix lacks.

    Thanks,
    Akhil.


2 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Elizabeth190803 ,


    As Poojara_D12  mentioned, the built-in Matrix visual can’t insert a custom row header like “Category” under each Vendor the best you can do natively is simulate it (turn off stepped layout or use a UNION table).

    If you need it to work exactly as described (a true header row under each Vendor), you’ll need either:

    • Paginated Reports (RDL) these support group headers out of the box. You can group by Vendor, then insert a header row labelled “Category” before listing the categories.
    • Or a custom visual such as Inforiver Matrix or Xviz Matrix, which provide nested headers and table-within-table formatting that the native Matrix lacks.

    Thanks,
    Akhil.


  • Hi Elizabeth190803 

    In Power BI’s native Matrix visual, you can’t directly insert a custom header row like “Category” between hierarchy levels, which is why your attempt with a measure caused the word to repeat across each column. The closest native workaround is to turn off the Stepped layout option so that Vendor and Category appear in separate columns, making “Category” act as a proper column header instead of needing a row header. If you specifically want a row under each Vendor that says “Category” before listing the actual categories, you would need to create a supporting table or a UNION in DAX that inserts a static “Category” row for each Vendor, and then ensure your measures return blank values for these artificial rows so only the label shows. Alternatively, you could use a custom visual (like Inforiver or Xviz Matrix) or even switch to a paginated report, which supports true group header rows. Essentially, with the built-in Matrix, you can simulate the look of a sub-table, but you can’t natively create a single header row under each Vendor without these workarounds.