cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
sz
Helper II
Helper II

EOMONTH equivalent in M

Is there an equivalent of EOMONTH function in Power Query?

Or is there a work around to calculate end of month of a date for next month, and for previous month?

 

I'll highly appreciate some help.

2 ACCEPTED SOLUTIONS
sz
Helper II
Helper II

ok so it will be

 

Date.EndOfMonth(Date.AddMonths([Date],1))

View solution in original post

watkinnc
Solution Sage
Solution Sage

You could do:

LoadDate = Table.AddColumn(LastStepName, "NewColumnName", each Date.EndOfMonth(Date.AddMonths([Column2]{0}, 1))

This will increment the date by one month, and then get that end of month date.

--Nate

View solution in original post

4 REPLIES 4
watkinnc
Solution Sage
Solution Sage

You could do:

LoadDate = Table.AddColumn(LastStepName, "NewColumnName", each Date.EndOfMonth(Date.AddMonths([Column2]{0}, 1))

This will increment the date by one month, and then get that end of month date.

--Nate

View solution in original post

watkinnc
Solution Sage
Solution Sage

Yes, it's Date.EndOfMonth(DateOrDateColumn), which returns the last date in the month for each date.

--Nate

eomonth(date,1) gives next month's end date. How would we do that in M?

sz
Helper II
Helper II

ok so it will be

 

Date.EndOfMonth(Date.AddMonths([Date],1))

View solution in original post

Helpful resources

Announcements
PBI User Groups

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group!

MBAS on Demand

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

July 2021 Update 768x460.png

Check it out!

Click here to read more about the July 2021 Updates

Top Solution Authors
Top Kudoed Authors