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
abloor
Helper IV
Helper IV

Stop % from summing in subtotal row

Hi, Can anyone please suggest how to stop a % measure from adding up in a subtotal row?  I want the subtotal row there, but want it to be blank for the List % and Var % columns as pictured, s they are values which can't be summarized.  I'm happy for the Share % subtotal to remain.

 

**Default Summarization is set to 'Don't Summarize'**

 

 

 

Annotation 2019-11-27 114708.png

 

I think the problem is stemming from the source data.  I'm linking to an excel file where there is a percentage in the cell. (I'm not acually doing the maths of dividing one value by another to get a percent. There's no way around this.)

 

Any ideas?

 

Thanks in advance!

 

Anna.

1 ACCEPTED SOLUTION

@abloor try this measure

 

TotalShare% = 
IF ( 
ISFILTERED( Table1[Colour] ), 
CALCULATE(SUMX('Table1','Table1'[Share %])) 
)

 



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

View solution in original post

8 REPLIES 8
parry2k
Super User
Super User

@abloor Anna, yes it can be done using ISFILTERED or ISINSCOPE DAX functions. If you can share pbix file with sample data ( remove sensitive info before sharing), I can get you the solution.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Thanks @parry2k   I have saved a sample file here:

 

https://1drv.ms/u/s!AvZLa7VG1kXrgUzUF80AD1lNGSya?e=aywdMW 

@abloor bit confused, there is no var % and other column which you don't want to aggregate? You have to be specific what you want and what your sample pbix contains. Read this post to get your answer quickly.

https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Sorry I just created generic sample data for the files uploaded and thought the column would be obvious - oops clearly not!

 

It's the TotalShare% column in my sample that is summing in the subtotal row, and I don't want it to. (In my real file the column that I'm having the issue with is a stand alone column like this one and doesn't link to or feed off any other columns, just like in my sample file.)

 

Thanks!

@abloor try this measure

 

TotalShare% = 
IF ( 
ISFILTERED( Table1[Colour] ), 
CALCULATE(SUMX('Table1','Table1'[Share %])) 
)

 



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Thanks @parry2k  I have successfully got it working in my report.

 

Appreciate your time!!  🙂

Hi @parry2k ,

 

I'm using your solution for a new matrix now, and I have to filter one of the fields so it's 'not blank'.  This makes the row subtotals show up again, despite your measure having taken it out as expected before I filtered out the blanks.  

 

Do you think I'd have to factor in this new filtered field into the measure to?

 

Thanks

For anyone finding this post in future, I worked it out to included another filter of BLANK.

 

TotalShare% =
IF (
ISFILTERED( Table1[Colour] ) && [Total Revenue] <> BLANK(),
CALCULATE(SUMX('Table1','Table1'[Share %]))
)

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.