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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
Tom02
Frequent Visitor

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
Memorable Member
Memorable Member

@Tom02 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



Tom02
Frequent Visitor

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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.