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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
HB2104
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!

4 REPLIES 4
nirali_arora
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!!

 

HB2104_1-1695833011632.png

 

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! 

HB2104_0-1695833197273.png

 

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.