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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
TobyYoung1
New Member

Date.IsInNWeeks

Is there a way to get all data in N weeks time from one column?

 

I have found Date.IsInNextNWeeks, however if I want the week after next (Next 2 weeks) I also get the next week. Which I don't want.

 

Filtering by the next N weeks then deleting all weeks up to N will be fine, but I'm not sure how to do it if its possible.

 

If anything needs clarifying please don't hesiate to ask, thanks in advance.

1 ACCEPTED SOLUTION
AlexisOlson
Super User
Super User

Your filter condition could be

Date.IsInNextNWeeks([DateCol], N) and not Date.IsInNextNWeeks([DateCol], N-1)

 

Alternatively, you could shift the date and check if it's in the next 1 week:

Date.IsInNextNWeeks(Date.AddWeeks([DateCol], N-1), 1)

View solution in original post

1 REPLY 1
AlexisOlson
Super User
Super User

Your filter condition could be

Date.IsInNextNWeeks([DateCol], N) and not Date.IsInNextNWeeks([DateCol], N-1)

 

Alternatively, you could shift the date and check if it's in the next 1 week:

Date.IsInNextNWeeks(Date.AddWeeks([DateCol], N-1), 1)

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

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

PBI_Carousel_NL_June

Fabric Community Update - June 2024

Get the latest Fabric updates from Build 2024, key Skills Challenge voucher deadlines, top blogs, forum posts, and product ideas.

Top Solution Authors
Top Kudoed Authors