Forum Discussion
sneidercub
4 years agoFrequent Visitor
Array to display the total category group
Hello Community, So I have this database with about 2 million rows structured like that. So what I want to do is show them in a matrix like this. I was trying to add the word...
- 4 years ago
Hi sneidercub ,
I've updated the Sum with Total measure to:Sum with Total = VAR __One = SELECTEDVALUE ( Category[Category] ) RETURN IF ( __One = "Total" || NOT ( HASONEVALUE ( Category[Category] ) ), CALCULATE ( SUM ( 'Table'[Value] ), ALL ( 'Table'[Category] ) ), CALCULATE ( SUM ( 'Table'[Value] ), FILTER ( 'Table', 'Table'[Category] = __One ) ) )The rest involves formatting the matrix visual. However, selectively removing the subtotal for each item in a column is not currently supported.
You may refer to the same link for the updated pbix.
danextian
Super User
4 years agoHi sneidercub ,
I've updated the Sum with Total measure to:
Sum with Total =
VAR __One =
SELECTEDVALUE ( Category[Category] )
RETURN
IF (
__One = "Total"
|| NOT ( HASONEVALUE ( Category[Category] ) ),
CALCULATE ( SUM ( 'Table'[Value] ), ALL ( 'Table'[Category] ) ),
CALCULATE (
SUM ( 'Table'[Value] ),
FILTER ( 'Table', 'Table'[Category] = __One )
)
)
The rest involves formatting the matrix visual. However, selectively removing the subtotal for each item in a column is not currently supported.
You may refer to the same link for the updated pbix.
sneidercub
4 years agoFrequent Visitor
Amazing! That's what I was looking for. Thank you so much!