Forum Discussion
How to combine to matrix visuals
- 1 year ago
You will need to disable the total row and a custom total row to the column you're using. Total will always be on the bottom or top depending on the visual. You can conditionally format the text color or the background to highlight the total.
total background = IF ( tbl[tradetype2] = "Total", "#eeeeee" ) --to be used as field valueYou will also need to use dynamic format strings to apply a different for mat to %. Example:
IF ( tbl[tradetype2] = "%", "0%", "0,0" )
Hi mp390988
There isn’t a built-in option via the standard UI to combine two separate matrices with shared headers or to create complex row layouts like in Excel.
However, there are two methods to achieve similar results:
1. Using an unrelated table with the desired row structure (including categories like Spot, Forward, TOTAL, Target, Variance, etc.). You can build dynamic DAX measures that return values based on the current row label. This method allows full control over row order and logic.
2. Using calculated groups – a feature that is already available in Power BI (through Field Parameters or Tabular Editor). This allows creating flexible, reusable grouping logic for building hybrid or asymmetrical matrix layouts.
Here are two great resources that demonstrate both techniques:
-
How I create a hybrid matrix with custom column names:
https://medium.com/@ugookoma/how-i-create-a-hybrid-matrix-with-custom-column-names-in-power-bi-8e93d614a0f3 -
Building a matrix with asymmetrical columns and rows in Power BI:
https://exceleratorbi.com.au/building-a-matrix-with-asymmetrical-columns-and-rows-in-power-bi/
Additionally, premium visuals like Zebra BI and Inforiver are built specifically to support this kind of advanced layout and dynamic totals.
https://zebrabi.com/power-bi-custom-visuals/tables/
https://inforiver.com/reporting-matrix/
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickl
Hi Ritaf1983 ,
Thank you for your response.
I followed one of the blogs you sent and it got me this far:
But the issue is I don't see tTO flowing into my matrix visual though I have declared a variable called tTo (which should display the total).
I have also included this in my HeaderTable as below:
But for some reason it does not show in my visual matrix. It does show when i remove the columns and values from my matrix as per below: