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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

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

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

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

Anonymous
Not applicable

@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
Community Champion
Community Champion

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
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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 Kudoed Authors