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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
gingerclaire
Helper III
Helper III

DAX to subract an amount for only one person?

Hi,

 

I am working on a Power BI report to work out how many working days each person has in a month.

 

I have been able to get to the stage where I have subtracted weekend, sick leave, holiday and bank holidays - but I have one person who does not work mondays.

 

At the moment I am using the following measure to count total working days:

(A-B) Working days minus days out = ('Date table'[A - Total working days])-CALCULATE(SUM(Leave[B - Total working days out of action]))

 

I have a separate measure to count the number of Mondays - but I cannot figure out how to subtract the [No. of Mondays] from just her total? Please help!

 

I want to show in a table:

 

NameTotal working days in month
Person A22
Person B (who doesn't work mondays18
1 ACCEPTED SOLUTION
v-easonf-msft
Community Support
Community Support

Hi, @gingerclaire 

If you just want to subtract the [No. of Mondays] from just Person B total, please add a new measure like:

Result1 =
IF (
    MAX ( 'Table'[Name] ) = "Person B",
    // MAX ( 'Table'[Name] ) IN { "Person B", "Person xx" },
    [Total working days in month],
    [Total working days in month] - [No. of Mondays]
)

 

Best Regards,
Community Support Team _ Eason

View solution in original post

3 REPLIES 3
v-easonf-msft
Community Support
Community Support

Hi, @gingerclaire 

If you just want to subtract the [No. of Mondays] from just Person B total, please add a new measure like:

Result1 =
IF (
    MAX ( 'Table'[Name] ) = "Person B",
    // MAX ( 'Table'[Name] ) IN { "Person B", "Person xx" },
    [Total working days in month],
    [Total working days in month] - [No. of Mondays]
)

 

Best Regards,
Community Support Team _ Eason

This worked - thank you so much! Only problem is I can't get the totals to show the 'correct' amount in the table (common measures issue but I don't quite understand how to fix it no matter how much time I spend reading about it!)

amitchandak
Super User
Super User

@gingerclaire , for the workday of the month you can use networkdays and customize it as per each person 

 

https://amitchandak.medium.com/power-bi-dax-function-networkdays-5c8e4aca38c

 

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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