Forum Discussion

SBC's avatar
SBC
Icon for Helper III rankHelper III
2 years ago
Solved

Issue with Displaying Correct Subtotals in Matrix Visual

Hello,

I'm seeking assistance with a matrix visual in Power BI where I need to use a specific column as a value without aggregation. Despite my efforts, the subtotals are not displaying as expected.

Background
In my 'Table_2', there's a column named (0-1) that I specifically want to display as it is, without any aggregation, in a matrix visual. To ensure that Power BI displays the exact values from this column without summing them up or applying any other aggregate functions, 

I've created a measure with the following DAX formula:

0-1 Measure=
VAR SelectedValue = SELECTEDVALUE('Table_2'[(0-1)])
RETURN IF(ISBLANK(SelectedValue), 0, SelectedValue)

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

Names       (0-1)
AA200
BB300
CC400
DE300

 

Matrix Visual Configuration
- Rows: Names
- 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:

Names            (0-1)
AA200
BB300
CC400
DE300
Subtotal0

 

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

 

Names                    (0-1)
AA200
BB300
CC400
DE300
Subtotal1200

 

The Challenge
How can I modify my measure or adjust the matrix settings to ensure that the subtotals correctly calculate the sum of the (0-1) values at each hierarchy level?

I would greatly appreciate any advice or solutions that could help me resolve this issue with the subtotals. Thank you for your time and assistance!

 

Warm regards,

SBC

  • Hi SBC 

    I am not sure if this meets your requirement, but I thought as the selectedvalue is a syntax suger for if-hasonevalue-values, if you put the sum in the if conditional branch, you can get the total for the values where the values are multiple.  

    Best regards,

7 Replies