Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Sakthikumar
Regular Visitor

How to combine two Matrix table into Single Matrix table

Sakthikumar_0-1725626158148.pngSakthikumar_1-1725626173015.png

In the attached screenshot, I have two different Matrix table visuals. The first table has been created based on the measures listed below. All these measures have been added to the Values fields, with Date added to the columns.

in % = DIVIDE([Manu with>0.5% change],[Total_Count_MANU],0)
Total_Count_MANU =
    COUNTAX(
            SUMMARIZE(
                Base,
                'Base'[Date],
                Base[Category],
                Base[MANU],
                "Monthly%", [Monthly%]
            ),
           
        [Monthly%]
    )

Manu with>0.5% change =
   COALESCE( COUNTAX(
        FILTER(
            SUMMARIZE(
                Base,
                'Base'[Date],
                Base[Category],
                Base[MANU],
                "Monthly%", [Monthly%]
            ),
            OR(
                [Monthly%] > 0.005,
                [Monthly%] < -0.005
            )
        ),
        [Monthly%]
    ),
    0)

In the second screenshot, the matrix table is created based on the following measures. The Category and Manu are placed in the Rows field, Date is placed in the Columns field, and Monthly%_Manu_T is placed in the Values field.
Monthly%_Manu_T1 =
IF(
    HASONEVALUE('Hybrid Matrix'[Date]),
    SWITCH(
        TRUE(),
        VALUES('Hybrid Matrix'[Date]) = DATE(2900,01,01),
        CALCULATE(
            MAXX(
                ALL('Hybrid Matrix'[Date]),
                [Monthly%]
            ),
            REMOVEFILTERS('Hybrid Matrix'[Date])
        ),
        VALUES('Hybrid Matrix'[Date]) = DATE(1900,01,01),
        CALCULATE(
            MINX(
                ALL('Hybrid Matrix'[Date]),
                [Monthly%]
            ),
            REMOVEFILTERS('Hybrid Matrix'[Date])
        ),
        [Monthly%]
    ),

    BLANK()
)
Monthly% =
IF(
    OR
    ([Percent_of_Parent_Row_Total_SIM]<>BLANK(),
    [Percent_of_Parent_Row_Total_BAU]<>BLANK()
    )
    ,
    [Percent_of_Parent_Row_Total_BAU] - [Percent_of_Parent_Row_Total_SIM]
    ,
    0
)
 
Percent_of_Parent_Row_Total_BAU =
DIVIDE(
    [Sales_BAU],
    CALCULATE(
        [Sales_BAU],
        ALLSELECTED('Base'[MANU])
    ),
    0
)
 
Percent_of_Parent_Row_Total_SIM =
DIVIDE(
    [Sales_SIM],
    CALCULATE(
        [Sales_SIM],
        ALLSELECTED(Base[MANU])
    ),
    0
)
I am looking to combine these two table visuals into a single table visualization.
1 REPLY 1
Selva-Salimi
Super User
Super User

Hi @Sakthikumar ,

 

One simple solution is to add 3 rows in your category dimension named for example "A","B", "C" and then write a measure as follows:

if (selectedvalue (category)="A", [in %],if (selectedvalue (category)="B" , [total] , if (selectedvalue (category)="C" , [Manu with>0.5% change ] , Monthly%_Manu_T1)))

 

although it might not be the best solution but it works. to find out the best solution it need to know about your data model and....

 

If this post helps, then I would appreciate a thumbs up  and mark it as the solution to help the other members find it more quickly. 

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

Top Kudoed Authors