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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

Get the subtotals of only one of the values of a column

Hello all,

I made a matrix, in which x is divided by Total Costs and Proceeds in a matrix. Both of them have a subtotal.

What I want is to only show for the Total Costs the subtotal, not for the Proceeds. This can't be done by the settings of the matrix, because this will turn on or off both values and you can't select different values for one column separately.

So, does anyone know how to keep the subtotal for the Total Costs, and disappear the subtotal for the proceeds?

Thank you in advance.

Regards,

Tom

 

14.jpg16.jpg15.jpg

2 REPLIES 2
nandic
Super User
Super User

@Anonymous it can't be done via matrix formatting options, but you can make it via DAX.

Example: i have matrix which shows year and category in rows, profit and quantity in values.
I want to show quantity only on category and total level, but not on year subtotals.

Here is calculation:

Quantity Total =
IF(
    ISINSCOPE(Podaci[Category]),  -- Check if the current row is at the category level
    SUM(Podaci[Quantity]),     -- If yes, return the total quantity for the quantity
    IF(
        HASONEVALUE(Podaci[Year]),  -- Check if the current row is at the subtotal level for the year
        BLANK(),                         -- If yes, return blank to hide the subtotal
        SUM(Podaci[Quantity])       -- Otherwise, return the quantity for the current row
    )
)

This is the output:
nandic_0-1715772609119.png


Cheers,
Nemanja Andic



Anonymous
Not applicable

Hi @nandic,

Thank you for your answer. Unfortunately I can't use this formule for two reasons:

First I want to get rid of one subtotal column and not of a row.

So, only giving me one subtotal column, instead of two.

Second is that the column which contains the Proceeds and Total Costs is not numeric, it is just text. Therefore I can't use a SUM function.

I hope I informed you better with this information.

Regards,

Tom

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.