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

How to add new column with end of month date based on today's date

Hi all, can someone please tell me how to add a column with end of month date in power bi query.

The month is based on today's date.  So if today is 12/04/2021 i need EOM date to be 30/04/2021.

thank you

1 ACCEPTED SOLUTION
V-pazhen-msft
Community Support
Community Support

@Anonymous 
Add the following custom column, then convert the data type to Date only.
= Date.EndOfMonth(DateTime.LocalNow())

V-pazhen-msft_0-1618382904985.png

 


Paul Zheng _ Community Support Team
If this post helps, please Accept it as the solution to help the other members find it more quickly.

 

View solution in original post

4 REPLIES 4
achinchilla
Frequent Visitor

Hi.  I need to have a new column with the last date from another column, how could I do that?

V-pazhen-msft
Community Support
Community Support

@Anonymous 
Add the following custom column, then convert the data type to Date only.
= Date.EndOfMonth(DateTime.LocalNow())

V-pazhen-msft_0-1618382904985.png

 


Paul Zheng _ Community Support Team
If this post helps, please Accept it as the solution to help the other members find it more quickly.

 

Anonymous
Not applicable

Awesome, it worked! Thanks Paul 🙂

ERD
Super User
Super User

Hello @Anonymous ,

There is a Date.EndOfMonth function in Power Query. Have a look at the article below:

https://docs.microsoft.com/en-us/powerquery-m/date-endofmonth 

So you can add custom column with the code:

=Date.EndOfMonth([Date])

 

Did I answer your question? Mark my post as solution!

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. Appreciate your Kudos.

Check out my latest demo report in the data story gallery.

Stand with Ukraine!


Here are official ways you can support Ukraine financially (accounts with multiple currencies):
1) Support the Armed Forces of Ukraine: https://bank.gov.ua/ua/about/support-the-armed-forces
2) Come Back Alive foundation: https://www.comebackalive.in.ua/

Thank you!

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