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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
A_a_a
Helper III
Helper III

Subtotals - different rules for different columns

Hi All,

 

I have a matrix table, with measures as values. Measures are calculated based on Places, but when I create the matrix table I want to show Councils as well.

Is there any possibility to show subtotals in some columns, and leave it empty in others?

 

A_a_a_0-1666947505603.png

Once I use this:

A_a_a_1-1666947772775.png

I can see all subtotals, not sure if there is a tool to split it or maybe I can add some information to the measure?

A_a_a_2-1666949917981.png

Please help.

 

G.

1 ACCEPTED SOLUTION
v-zhangti
Community Support
Community Support

Hi, @A_a_a 

 

You can try the following methods.

Sample data:

vzhangti_0-1667265061397.png

Measure:

A = SUM('Table'[Value])
B = DIVIDE(SUM('Table'[Value]),CALCULATE(SUM('Table'[Value]),ALL('Table')))
Measure A = IF(HASONEVALUE('Table'[Type]),[A],BLANK())
Measure B = IF(HASONEVALUE('Table'[Type]),[B],BLANK())

vzhangti_1-1667265148361.png

Row total is always on. But Dax can control whether Total outputs blank or numeric.

Best Regards,

Community Support Team _Charlotte

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

5 REPLIES 5
v-zhangti
Community Support
Community Support

Hi, @A_a_a 

 

You can try the following methods.

Sample data:

vzhangti_0-1667265061397.png

Measure:

A = SUM('Table'[Value])
B = DIVIDE(SUM('Table'[Value]),CALCULATE(SUM('Table'[Value]),ALL('Table')))
Measure A = IF(HASONEVALUE('Table'[Type]),[A],BLANK())
Measure B = IF(HASONEVALUE('Table'[Type]),[B],BLANK())

vzhangti_1-1667265148361.png

Row total is always on. But Dax can control whether Total outputs blank or numeric.

Best Regards,

Community Support Team _Charlotte

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

 

Hi @v-zhangti ,

 

this is perfect. Thank you!

Ashish_Mathur
Super User
Super User

Hi,

The measure of those 2 columns can be modified.  Share the download link of the PBI file.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
A_a_a
Helper III
Helper III

Hi @amitchandak,

 

thank you for your reply.

If I use the function that you mentioned above I will see subtotals (on/off) for all columns.

My question is if I can have it on only for two columns as I showed in the picture above ( 2 - on, 2 off).

 

Thanks,

G.

amitchandak
Super User
Super User

@A_a_a , In subtotal you have an option for per row level, You can enable and disable subtotal once you use that

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

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.

Top Solution Authors