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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Matrix Visual - Row Grand Total

Hi all!

 

I have managed to create a Matrix visual that looks like the following:

zakharia1995_0-1690950109142.png

Group 1 - Group 3 are columns made out of measure that calculates percentage amount from the value in 'Sum of Set-off / payment amount' column.

 

In the rightmost part of the visual, there is the grand total columns for each of the rows:

zakharia1995_1-1690950246023.png

Why the Group 1 to Group 3 are not summed? Is there a way to sum the Group columns?

 

Best regards,

Bona

1 ACCEPTED SOLUTION
v-yiruan-msft
Community Support
Community Support

Hi @Anonymous ,

You can try to create another 3 new measures as below, and put them on the matrix to replace the original measures [Group 1], [Group 2] and [Group 3].

Ngroup1 =
SUMX (
    VALUES ( 'Date'[Fiscal year] ),
    SUMX ( VALUES ( 'Tablex'[Obligation type] ), [Group 1] )
)
Ngroup2 =
SUMX (
    VALUES ( 'Date'[Fiscal year] ),
    SUMX ( VALUES ( 'Tablex'[Obligation type] ), [Group 2] )
)
Ngroup3 =
SUMX (
    VALUES ( 'Date'[Fiscal year] ),
    SUMX ( VALUES ( 'Tablex'[Obligation type] ), [Group 3] )
)

Best Regards

Community Support Team _ Rena
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

4 REPLIES 4
v-yiruan-msft
Community Support
Community Support

Hi @Anonymous ,

You can try to create another 3 new measures as below, and put them on the matrix to replace the original measures [Group 1], [Group 2] and [Group 3].

Ngroup1 =
SUMX (
    VALUES ( 'Date'[Fiscal year] ),
    SUMX ( VALUES ( 'Tablex'[Obligation type] ), [Group 1] )
)
Ngroup2 =
SUMX (
    VALUES ( 'Date'[Fiscal year] ),
    SUMX ( VALUES ( 'Tablex'[Obligation type] ), [Group 2] )
)
Ngroup3 =
SUMX (
    VALUES ( 'Date'[Fiscal year] ),
    SUMX ( VALUES ( 'Tablex'[Obligation type] ), [Group 3] )
)

Best Regards

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

Thank you so much for your help!

 

The updated formula now worked as intended.

Anonymous
Not applicable

Hello!

 

Sorry for reverting back just now.

 

I tried creating a new measure with the codes from your post, but this error message popped up:

zakharia1995_0-1691478601453.png

For your reference, this is the list of fields available in my dataset:

zakharia1995_1-1691478664916.png

And this is how I write the formula for Group 1 - Group 3:

Group 1 = SELECTEDVALUE(Sheet1[Set-off / payment amount]) * 0.25
Group 2 = SELECTEDVALUE(Sheet1[Set-off / payment amount]) * 0.35
Group 3 = SELECTEDVALUE(Sheet1[Set-off / payment amount]) * 0.32
 
What should I do to prevent the error message? I think this is caused by the 'Date' and 'Tablex', but I am not sure.

Hi @Anonymous ,

Yes, you are right. The table 'Date' and 'Tablex' not exist in your model, your table name is "Sheet1"... Please update the formula of measure as below:

NGroup1 =
SUMX (
    GROUPBY ( 'Sheet1', 'Sheet1'[Fiscal year], 'Sheet1'[Obligation type] ),
    [Group 1]
)
NGroup2 =
SUMX (
    GROUPBY ( 'Sheet1', 'Sheet1'[Fiscal year], 'Sheet1'[Obligation type] ),
    [Group 2]
)
NGroup3 =
SUMX (
    GROUPBY ( 'Sheet1', 'Sheet1'[Fiscal year], 'Sheet1'[Obligation type] ),
    [Group 3]
)

Best Regards

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

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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