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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
jimpatel
Helper V
Helper V

Working days plus one

Hi,

 

thanks for looking at my post.

 

I have a date column and i wanted to add one working date to it please.

 

That is Date column (not necessary today's date) + one working date please?

 

Any idea please?

1 ACCEPTED SOLUTION
jpessoa8
Super User
Super User

Hello @jimpatel ,

 

Are you talking about a implementation in PowerBI as a Calculated Column or in PowerQuery?

For the first option, you can use a validation formula and add the number of days accordingly, like :

 

 

 

DatePlus1= 
SWITCH(TRUE(),
          /*If Date+1 is Saturday, add 3 days*/  WEEKDAY( 'Table'[Column1] + 1,1) = 7 , 'Table'[Column1] + 3,
          /*If Date+1 is Sunday, add 2 days*/  WEEKDAY( 'Table'[Column1] + 1,1) = 1 , 'Table'[Column1] + 2,
          /*Else Date+1*/ 'Table'[Column1] + 1
)

 

 

 

jpessoa8_0-1699372292401.png

 

This will work for business days, but only if excluding weekends. Another implementation for holidays would have to be planned, depending how you have that information in your dataset.

 

Hope this answer solves your problem!
If you need any additional help please @ me in your reply.
If my reply provided you with a solution, please consider marking it as a solution ✔️ or giving it a kudo 👍
Thanks!

You can also check out my LinkedIn!

Best regards,
Jorge Pessoa

View solution in original post

2 REPLIES 2
jimpatel
Helper V
Helper V

Much appreciated for your kind help.

 

Thanks a lot 🙂

jpessoa8
Super User
Super User

Hello @jimpatel ,

 

Are you talking about a implementation in PowerBI as a Calculated Column or in PowerQuery?

For the first option, you can use a validation formula and add the number of days accordingly, like :

 

 

 

DatePlus1= 
SWITCH(TRUE(),
          /*If Date+1 is Saturday, add 3 days*/  WEEKDAY( 'Table'[Column1] + 1,1) = 7 , 'Table'[Column1] + 3,
          /*If Date+1 is Sunday, add 2 days*/  WEEKDAY( 'Table'[Column1] + 1,1) = 1 , 'Table'[Column1] + 2,
          /*Else Date+1*/ 'Table'[Column1] + 1
)

 

 

 

jpessoa8_0-1699372292401.png

 

This will work for business days, but only if excluding weekends. Another implementation for holidays would have to be planned, depending how you have that information in your dataset.

 

Hope this answer solves your problem!
If you need any additional help please @ me in your reply.
If my reply provided you with a solution, please consider marking it as a solution ✔️ or giving it a kudo 👍
Thanks!

You can also check out my LinkedIn!

Best regards,
Jorge Pessoa

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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