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
Anonymous
Not applicable

AddWeeks to date column but February came back with 31 days instead of 28 days

Hi,

I want to add six weeks to my planned date column but for one cell February came back as 31 days, when we know its only 28 days this year.

 

I used : Date.AddWeeks([Planned Sprint],6)

Planned date: 19/11/2019 - Caculated date: 31/02/2020

 

How do I correct 31/02/2020 to 28/02/2020?

 

Thanks

Liz

 

2 ACCEPTED SOLUTIONS
v-juanli-msft
Community Support
Community Support

Hi @Anonymous 

I can't reproduce your problem.

As tested with this funtion, it shows expected value.

3.JPG

 

Best Regards
Maggie
Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

edhans
Super User
Super User

It isn't possible to have a 31/2/2020 date. February never has 30 or more days. But Feb 29, 2020 is legit. You can see at the top I'm using the same Date.AddWeeks() function.

 

2020-03-17 20_28_08-Untitled - Power Query Editor.png



Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

DAX is for Analysis. Power Query is for Data Modeling


Proud to be a Super User!

MCSA: BI Reporting

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

Hi,

 

Sorry I look at the wrong data set. I've sorted it out now.

 

Thanks for your time and assisstance.

Liz 

edhans
Super User
Super User

It isn't possible to have a 31/2/2020 date. February never has 30 or more days. But Feb 29, 2020 is legit. You can see at the top I'm using the same Date.AddWeeks() function.

 

2020-03-17 20_28_08-Untitled - Power Query Editor.png



Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

DAX is for Analysis. Power Query is for Data Modeling


Proud to be a Super User!

MCSA: BI Reporting
v-juanli-msft
Community Support
Community Support

Hi @Anonymous 

I can't reproduce your problem.

As tested with this funtion, it shows expected value.

3.JPG

 

Best Regards
Maggie
Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

artemus
Employee
Employee

I'm not sure I follow.

 

First there are 29 days in Febuary this year, not 28.

 

Second, November 11th 2019 + 6 week = December 31st 2019, or 31/12/2019

 

If you are sure you are seeing a Febuary 31st date. Is this possibly a string instead of a date? Power Bi will reject any attempt to create that date.

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.

Top Solution Authors
Top Kudoed Authors