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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
annaka05
Helper I
Helper I

Additional subtotal in matrix

Hi,

is it possible to add additional subtotal in matrix visualisation?

I have two row levels and I would like to have Subtotal for all A values and all B values, just like below:

matrix.png

I will be appreciate for any suggestions.

Anna

 

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

Hi @annaka05 ,

 

Based on your description, I have created a simple sample:

vjianbolimsft_0-1674019594940.png

Please try:

Measure = 
var _a = SUM('Table'[Value])
var _b = CALCULATE(SUM('Table'[Value]),FILTER('Table',[Category]="A"))
var _c = CALCULATE(SUM('Table'[Value]),FILTER('Table',[Category]="B"))
return IF(ISINSCOPE('Table'[ID]),_a,"Total A: " &_b&" Total B: "&_c&" Total: "&_a)

Final output:

vjianbolimsft_1-1674019613540.png

Best Regards,

Jianbo Li

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

3 REPLIES 3
v-jianboli-msft
Community Support
Community Support

Hi @annaka05 ,

 

Based on your description, I have created a simple sample:

vjianbolimsft_0-1674019594940.png

Please try:

Measure = 
var _a = SUM('Table'[Value])
var _b = CALCULATE(SUM('Table'[Value]),FILTER('Table',[Category]="A"))
var _c = CALCULATE(SUM('Table'[Value]),FILTER('Table',[Category]="B"))
return IF(ISINSCOPE('Table'[ID]),_a,"Total A: " &_b&" Total B: "&_c&" Total: "&_a)

Final output:

vjianbolimsft_1-1674019613540.png

Best Regards,

Jianbo Li

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

@v-jianboli-msft ,

this is exactly what i wanted! Thank you a lot!

 

Anna

lbendlin
Super User
Super User

Please don't duplicate data in the same visual.  Use a separate visual.

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.