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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

Matrix Total Column

Hi All! Can I take different values for 'Total Column' and 'Values' in Matrix or Matrix Preview?

I have 6 calculated measures/columns. Those are Target Qty, Ach Qty, Ach%, Target Value $, Ach Val $, Val%.

The matrix I need is like below:

Matrix.JPG

SKU 1 and SKU 2 columns should be quantities and 'Total Column' should be sum of values of both SKUs.

Please help!

Thank You!

1 ACCEPTED SOLUTION
v-yulgu-msft
Microsoft Employee
Microsoft Employee

Hi @Anonymous,

 

Based on below data view structure (in my test, Target Qty, Ach Qty, Ach%, Target Value , Ach Value, Val% are all calculated columns), we can get the desired matrix output.

1.PNG

 

First, we should add an extra column into above table.

Total = "Total"

 

Then, create several calculated tables.

New Table1 =
SELECTCOLUMNS (
    Matrix,
    "Sector", Matrix[Sector],
    "SKU", Matrix[Total],
    "Target Qty", Matrix[Target Value],
    "Ach Qty", Matrix[Ach Value],
    "Ach%", Matrix[Val%]
)

New Table1_1 =
SUMMARIZE (
    'New Table1',
    'New Table1'[Sector],
    "SKU", LASTNONBLANK ( 'New Table1'[SKU], 1 ),
    "Target Qty", AVERAGE ( 'New Table1'[Target Qty] ),
    "Ach Qty", AVERAGE ( 'New Table1'[Ach Qty] ),
    "Ach%", AVERAGE ( 'New Table1'[Ach%] )
)

New Table2 =
UNION (
    SELECTCOLUMNS (
        Matrix,
        "Sector", Matrix[Sector],
        "SKU", Matrix[SKU],
        "Target Qty", Matrix[Target Qty],
        "Ach Qty", Matrix[Ach Qty],
        "Ach%", Matrix[Ach%]
    ),
    'New Table1_1'
)

Then, we can add a matrix whose fields are referring to 'New Table2'.

2.PNG

 

Best regards,
Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
v-yulgu-msft
Microsoft Employee
Microsoft Employee

Hi @Anonymous,

 

Based on below data view structure (in my test, Target Qty, Ach Qty, Ach%, Target Value , Ach Value, Val% are all calculated columns), we can get the desired matrix output.

1.PNG

 

First, we should add an extra column into above table.

Total = "Total"

 

Then, create several calculated tables.

New Table1 =
SELECTCOLUMNS (
    Matrix,
    "Sector", Matrix[Sector],
    "SKU", Matrix[Total],
    "Target Qty", Matrix[Target Value],
    "Ach Qty", Matrix[Ach Value],
    "Ach%", Matrix[Val%]
)

New Table1_1 =
SUMMARIZE (
    'New Table1',
    'New Table1'[Sector],
    "SKU", LASTNONBLANK ( 'New Table1'[SKU], 1 ),
    "Target Qty", AVERAGE ( 'New Table1'[Target Qty] ),
    "Ach Qty", AVERAGE ( 'New Table1'[Ach Qty] ),
    "Ach%", AVERAGE ( 'New Table1'[Ach%] )
)

New Table2 =
UNION (
    SELECTCOLUMNS (
        Matrix,
        "Sector", Matrix[Sector],
        "SKU", Matrix[SKU],
        "Target Qty", Matrix[Target Qty],
        "Ach Qty", Matrix[Ach Qty],
        "Ach%", Matrix[Ach%]
    ),
    'New Table1_1'
)

Then, we can add a matrix whose fields are referring to 'New Table2'.

2.PNG

 

Best regards,
Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors