Forum Discussion

Veblengood's avatar
Veblengood
Helper I
3 years ago
Solved

Combining multiple sections in a matrix

I have a matrix with sales by category in rows and by years (from date table) in columns. At the same time I have a different matrix showing indexes comparing this year sales to last year sales and so on using the same categories.

 

What I want is to combine those matrices (as you would do in excel) into one, without repeating the indeces for each year. Is this possible? Another solution would be to make one matrix dependent on the other so that the same categories are always displayed in either matrix.

 

Category202120222023
A123
B405060

 

CategoryIndex YAIndex vs 2 YA
A50%300%
B  

 

 Year  Index 
Category202120222023Index YaIndex 2 Ya
A12350%300%
B405060  

 

  • Hi , Veblengood 

    According to your description, you want to combine two Matix visual to one . Right?
    In Power BI Desktop , if you want to realize it , you need to create  a new table as the column headers , like this:

    Then we need use this table as the Matrix's column headers . And then we need to create a measure to judge the column name(We can use SWITCH() or IF() function) and calculate the value in the logic.

     

    Thank you for your time and sharing, and thank you for your support and understanding of PowerBI! 

     

    Best Regards,

    Aniya Zhang

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

2 Replies