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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
vs24
New Member

Need Help with Displaying Correct Subtotals in Power BI Matrix Visual

Hello Fabric Community,I need some help with a problem I'm facing in Power BI. I'm using a matrix visual and I want to show individual values from a column (0-1) without summing them up. I used this DAX formula to create a measure:

dax

VAR SelectedValue = SELECTEDVALUE('T&S Table_2'[(0-1)])

RETURN IF(ISBLANK(SelectedValue), 0, SelectedValue)

 

This measure works well for displaying the data, but the subtotals are not adding up correctly; they just show as 0. I need the subtotals to correctly sum up the values at each level of the hierarchy.

Sample Input Data
Below is a sample of the data from 'Table_2':

-Category A

 

     Subcategory A1

100

      Subcategory A2

200

-Category B

 

     Subcategory B1

200

     Subcategory B2

300

     Subcategory B3

200

 

Matrix Visual Configuration
- Rows: categroies and subcategories 
- Values: The measure based on the (0-1) column

 Current Output with Issue
The matrix correctly displays the individual (0-1) values for each ID, but the subtotal is incorrectly showing as 0.

Matrix Visual:

-Category A

 

     Subcategory A1

100

      Subcategory A2

200

subtotal 

0

 

 

-Category B

 

     Subcategory B1

200

     Subcategory B2

300

     Subcategory B3

200

subtotal 

0

 

Desired Output
I need the subtotal to accurately sum the individual (0-1) values:

-Category A

 

     Subcategory A1

100

      Subcategory A2

200

subtotal 

300

-Category B

 

     Subcategory B1

200

     Subcategory B2

300

     Subcategory B3

200

subtotal 

700

subtotal (category Aand B comes under one section)

1000

 

Does anyone have experience with this issue or any advice on how to fix the subtotal calculation in the matrix? Any suggestions would be really helpful.Thanks in advance for your help!

Best regards,

vs24

1 REPLY 1
lbendlin
Super User
Super User

Looks like your source data may not be in the right format. Try this instead

 

lbendlin_0-1714400999349.png

 

 

Then the matrix visual creates itself.

 

lbendlin_1-1714401051416.png

Or if you want the totals at the bottom

 

lbendlin_2-1714401156795.png

 

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.