Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

Helper I
Helper I

DAX for subtracting number of days

Hello -


Anyone know if there is a DAX formula that can subtract a specific number of working days from a date given? So lets says date is today 9/26/23 and I need to subtract 7 business days from that date which is 9/18/23. Thanks!

Resolver II
Resolver II

You can use the following dax measure

SubtractWorkingDays = VAR StartDate = TODAY() // Replace with your specific date

VAR NumDaysToSubtract = 7 // Replace with the number of business days to subtract

VAR CalendarTable = CALENDAR(StartDate - NumDaysToSubtract, StartDate)

VAR WorkingDaysTable = FILTER(CalendarTable, WEEKDAY([Date], 2) <= 5)

RETURN MAXX(WorkingDaysTable, [Date])

Do I need to make a working days calendar for this dax? Slightly new at using so trying to understand. Thank you!!




Here is the formula I created but in the subtract working days column it is still giving me the same date rather than prior 7 business days before. Thank you! 



Helpful resources

PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors