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

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

Reply
Anonymous
Not applicable

Customized Matrix & SUM function & Customized Subtotals

Hi All, 

 

This time I have got stucked with customised matrix. 

 

The goal is to to have matrix with custom subtotal  A+C = 8

koooala_16-1617037128703.png

________________________________________________________________________________________

input table with values 

koooala_1-1617036300721.png

 

category table 

koooala_3-1617036325593.png

 

model Category[Category]1-*Input[Letter]

koooala_5-1617036411215.png

 

functions:

A

koooala_9-1617036479105.png

B

koooala_10-1617036497245.png

C

koooala_11-1617036531072.png

A+C

koooala_12-1617036559965.png

 

In case I try to represent values on cards visualizatins I got folowing result

koooala_13-1617036641292.png

In case I try to represent values in matrix table I have difficulties to present A+C function 

koooala_15-1617036882832.png

 

koooala_14-1617036770918.png

 

Thank you in advance for your reply. 

 

1 ACCEPTED SOLUTION

Hi @Anonymous,

 

could you try this for A+C:

A+C = SUMX(FILTER(ALLSELECTED(Input), Input[Letter] = "A" || Input[Letter] = "C"), Input[Value])

Did this answer your question? Mark my post as a solution!

View solution in original post

5 REPLIES 5
Markus_Re
Resolver I
Resolver I

Hi @Anonymous,

 

in your "Values for Matrix"-Measure you are using the Column "Input[Letter ]", and try to select "A+C",

 

As you state above this table does not include "A+C", only the "Category"-Table does.

 

So i would suggest swapping out SELECTEDVALUE(Input[Letter ]) for SELECTEDVALUE(Category[Category]) in the Values for Matrix"-Measure

 

Hope this helps.

 

Best regards,

 

Markus

 

Did this answer your question? Mark my post as a solution!

Anonymous
Not applicable

Thank you for your reply, 

unfortunately it doesn't work 😞

Hi @Anonymous,

 

could you try this for A+C:

A+C = SUMX(FILTER(ALLSELECTED(Input), Input[Letter] = "A" || Input[Letter] = "C"), Input[Value])

Did this answer your question? Mark my post as a solution!

Anonymous
Not applicable

@Markus_Re 
It works great! 

Could you advice me how to approach next issue
I would like to have this kind of matrix 

koooala_0-1617041406946.png

where A+C is the sum of both A and C but considering the category One, Two, .... 
Currently there are no other values so the results will be
A+C | 2 4 6 0 

 



Hi @Anonymous,

Here is how I would solve this:
Create a third table that includes Value and discription (just like the table "Category), but this table has no active relation to any other table (in my case called ValueDescription). The tables can´t be related because of the fact, that for the Category A+C no values exist in the Input-Table and so the Measure A+C in connection with the new table will never return any values:

 

 

 

 

To build the visual I used this columns: Category[Category] in Rows, ValueDescription[Description] in Columns, and [Values for Matrix] in the Values-Section.

 

For this to work all the Measures have to be changed like the following:

For example A (B,C):

A =

IF(HASONEVALUE(ValueDescription[Description]),
SUMX(FILTER(ALLSELECTED(Input), Input[Letter] = "A" && Input[Description] = SELECTEDVALUE(ValueDescription[Description])), Input[Value]),
SUMX(FILTER(ALLSELECTED(Input), Input[Letter] = "A"), Input[Value]))


and A+C:

A+C =

IF(HASONEVALUE(ValueDescription[Description]),
SUMX(FILTER(ALLSELECTED(Input), (Input[Letter] = "A" || Input[Letter] = "C") && Input[Description] = SELECTEDVALUE(ValueDescription[Description])), Input[Value]),
SUMX(FILTER(ALLSELECTED(Input), Input[Letter] = "A" || Input[Letter] = "C"), Input[Value]))
This change is necessary because as described above, we can´t enable a relation between Input and ValueDescription. All it does is, it checks if a single ValueDescription is Selected and if so it returns only the Sum of the Selected Description

 

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

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.