The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
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?
Solved! Go to Solution.
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
)
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
Much appreciated for your kind help.
Thanks a lot 🙂
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
)
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
Hi,
Sorry for reopening this post.
What should i do if i need to add date plus 40 days (excluding weekends please)
Formula does not work correctly for adding 40 days from date (which will be different dates) and excluding weekend please?
Any idea please
thanks a lot 🙂
User | Count |
---|---|
16 | |
8 | |
7 | |
6 | |
6 |
User | Count |
---|---|
25 | |
13 | |
12 | |
8 | |
8 |