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
Gheb_Gabriela
Frequent Visitor

How to Sum a row in a matrix

Hi everyone, need some help if possible with something.

 

I have this situation, where all the totals are right, but only the grand total is not good. There is any solution for it?

 

For this metrix, i have only used a sum of total, see below 

 

Gheb_Gabriela_0-1677844220639.png

Only this result is wrong. Maybe I think in the matrix, there are spaces for where there is no information and for them there will be 0.

 

If any can help with this one 🙂 Thanks a lot.

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi  @Gheb_Gabriela ,

I created some data:

vyangliumsft_0-1678073160601.png

 

Here are the steps you can follow:

1. Create measure.

Measure 2 =
var _table1=
SUMMARIZE(
    'Table','Table'[Group],"value",[Measure])
var _table2=
SUMMARIZE(
    'Table','Table'[Group2],"value",[Measure])  
return
IF(
    NOT(ISINSCOPE('Table'[Group])),
    SUMX(_table1,[value]),
    IF(
        NOT(ISINSCOPE('Table'[Group2])),SUMX(_table2,[value]),[Measure]))

2. Result:

vyangliumsft_1-1678073160605.png

 

Best Regards,

Liu Yang

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

2 REPLIES 2
Anonymous
Not applicable

Hi  @Gheb_Gabriela ,

I created some data:

vyangliumsft_0-1678073160601.png

 

Here are the steps you can follow:

1. Create measure.

Measure 2 =
var _table1=
SUMMARIZE(
    'Table','Table'[Group],"value",[Measure])
var _table2=
SUMMARIZE(
    'Table','Table'[Group2],"value",[Measure])  
return
IF(
    NOT(ISINSCOPE('Table'[Group])),
    SUMX(_table1,[value]),
    IF(
        NOT(ISINSCOPE('Table'[Group2])),SUMX(_table2,[value]),[Measure]))

2. Result:

vyangliumsft_1-1678073160605.png

 

Best Regards,

Liu Yang

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

Padycosmos
Solution Sage
Solution Sage

Helpful resources

Announcements
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!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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