Forum Discussion
Array to display the total category group
- 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.
That's great!
Thank you for your help!
I think I may have simplified too much the issue, let me try to show a little more about what I'm working on:
so this is a "better" view for the data base:
besides year there are like other 4 or 5 "categories" that I would have to take in consideration, and the final view I want to get should look more like this:
and taking into consideration it's a 2 million rows database I'm not sure if creating a new disconnected table with a cross join will help.
Could you help me with your approach to this?
Thank you again danextian
Please post a sample data that can be easily copy-pasted.
- sneidercub4 years agoFrequent Visitor
Here you are:
https://docs.google.com/spreadsheets/d/14CSGPTs_FFL3DWlEckaXKCWjHF-egpBt/edit?usp=sharing&ouid=116732289583836786781&rtpof=true&sd=true
Thank you so much!- danextian4 years ago
Super User
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.
- sneidercub4 years agoFrequent Visitor
Amazing! That's what I was looking for. Thank you so much!