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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
vyny17
Frequent Visitor

How to add n business days to date using DAX

Hi there!

 

Here is the thing, i have a table with a date column and I want to create a new column adding 5 or 7 business days  to it, depending on some conditions.

I've also heard that there's this "new" function NETWORKDAYS( ), i thought I could use it somehow but it doesn't seem to solve my problem.

 

What can I do? 😄 

1 ACCEPTED SOLUTION
ryan_mayu
Super User
Super User

@vyny17 

maybe you can try this

5 businessday = if('Table'[Column]=6,'Table'[Date]+6,if('Table'[Column]=7,'Table'[Date]+5,'Table'[Date]+7))
 
7 businessday = if('Table'[Column] in {1,2,3},'Table'[Date]+9, if('Table'[Column]in {4,5},'Table'[Date]+11,if('Table'[Column]=6,'Table'[Date]+10,if('Table'[Column]=7,'Table'[Date]+9))))
 
1.PNG
pls see the attachment below




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

3 REPLIES 3
vyny17
Frequent Visitor

Thx bro! You saved me!!

you are welcome





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




ryan_mayu
Super User
Super User

@vyny17 

maybe you can try this

5 businessday = if('Table'[Column]=6,'Table'[Date]+6,if('Table'[Column]=7,'Table'[Date]+5,'Table'[Date]+7))
 
7 businessday = if('Table'[Column] in {1,2,3},'Table'[Date]+9, if('Table'[Column]in {4,5},'Table'[Date]+11,if('Table'[Column]=6,'Table'[Date]+10,if('Table'[Column]=7,'Table'[Date]+9))))
 
1.PNG
pls see the attachment below




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.