Custom column for extracting data from current week , +1 , +2

sara1312

New Member
Joined
Sep 9, 2024
Messages
10
Office Version
  1. 365
Platform
  1. Windows
Hi , The start of the week date is every monday.

And I tried to add today the below query to get the data for current week +1 if the file is refreshed on monday to wed
and the week + 1 , +2 if refreshed on Thursday and Friday .

The below returns only the week +1 not the week.

= Table.AddColumn(#"Inserted Day Name", "Custom", each if List.Contains ({"Monday","Tuesday","Wednesday"}, [Day Name]) then Date.IsInNextNWeeks([Start of Week Date],1) or Date.IsInPreviousNWeeks([Start of Week Date],0) else Date.IsInNextNWeeks([Start of Week Date],2)




1726077837336.png
 

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
Why have you got this part in there: or Date.IsInPreviousNWeeks([Start of Week Date],0)
 
Upvote 0

Forum statistics

Threads
1,223,880
Messages
6,175,155
Members
452,615
Latest member
bogeys2birdies

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top