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! Request now

Reply
skv17
Helper II
Helper II

Add date if it comes on a Tuesday and Wednesday

Hi team,

 

for example if a date on a column arrival lands on a tuesday or a wednesday add 2 days if tuesday and add 1 day if it is thursday.

 

so if date is 24/10/2023 then add 2 days so date is 26/10/2023

and if date is 25/10/2023 then add 1 days so date is 26/10/2023

 

need on m query power bi as a custom column.

1 ACCEPTED SOLUTION
Idrissshatila
Super User
Super User

Hello @skv17 ,

 

First of all, you create a day column out of the date column

 

then you use the following formula in the custom column

 

if [Day Name] = "Tuesday" or [Day Name] = "Wednesday" then Date.AddDays([Date], 2) else if [Day Name] = "Thursday" then Date.AddDays([Date], 1) else [Date]

 

then convert the column type to date



Did I answer your question? Mark my post as a solution! Appreciate your Kudos
Follow me on LinkedIn linkedIn
Vote for my Community Mobile App Idea

Proud to be a Super User!




View solution in original post

2 REPLIES 2
Ahmedx
Super User
Super User

try this

you can change {3,4} as you wish

Column =  
VAR _Dayweek = WEEKDAY('Calendar'[Date])
RETURN
 SWITCH( TRUE(),
  _Dayweek in {3,4} , 'Calendar'[Date]+2,
  _Dayweek in {5},'Calendar'[Date]+1,
  'Calendar'[Date])

 

Screenshot_5.png 

Idrissshatila
Super User
Super User

Hello @skv17 ,

 

First of all, you create a day column out of the date column

 

then you use the following formula in the custom column

 

if [Day Name] = "Tuesday" or [Day Name] = "Wednesday" then Date.AddDays([Date], 2) else if [Day Name] = "Thursday" then Date.AddDays([Date], 1) else [Date]

 

then convert the column type to date



Did I answer your question? Mark my post as a solution! Appreciate your Kudos
Follow me on LinkedIn linkedIn
Vote for my Community Mobile App Idea

Proud to be a Super User!




Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

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!

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.

Top Solution Authors
Top Kudoed Authors