Subtotal that reflects slicer selection

I am trying to calculate a subtotal that will reflect slicer selections in all rows of a matrix. I have a sample table with employees, types of leave, and the amount of each. There is a separate, related table of leave types that I’m using to slice the table. I want to show the total amount of leave for each employee by type, along with the total overall amount of the selected leave types for each employee.

Here’s the visual with nothing selected, all good here:
image

But in this case, the “Avail by Employee” column should read 70 in all rows for Employee 1, 50 in all rows for Employee 2, and so on:
image

This is a greatly simplified version of my full model, but I think it includes the necessary components. I’m attaching a dataset and simple model. Your help is much appreciated.Test data PBI.pbix (28.8 KB) Test data.xlsx (10.9 KB)

Can you give this a go

Avail by Employee = 
SUMX(
    ALLSELECTED(Table3[Types]),
    [Available]
)
1 Like
Avail by Employee = 
CALCULATE (
    [Available],
    ALLSELECTED( Table3[Types] )
)

Thank you both for your quick replies. Both worked for my simple scenario, and with some modification I could get them both working in my full report. I had tried a variation of AntrikshSharma’s formula, but it wasn’t working because I had carried over an additional ALLEXCEPT from a different measure that I thought was essential to get the result I needed in my full report. It sure wasn’t :blush:

I appreciate your assistance!