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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
Anonymous
Not applicable

Dynamic finds the value assigned to last day of the month

Hi, 

From a date column, I would like to calulate a measure which which find the value associated to the last day of the current month. 

Can you assist in this?

Thanks

 

 

3 ACCEPTED SOLUTIONS
collinq
Super User
Super User

Hi @Anonymous ,

 

The command in Dax for this is the "eomonth" command.  As explained here:

EOMONTH function (DAX) - DAX | Microsoft Learn

 

But, if you are doing it in M, then it would be these 5 steps:

collinq_0-1720812642514.png

 

 




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

Proud to be a Datanaut!
Private message me for consulting or training needs.




View solution in original post

trebgatte
Most Valuable Professional
Most Valuable Professional

You can also do this in Power Query if needed. I do this a lot with StartOfMonth to group records.

 

Define a custom column with Date.EndOfMonth([YourDateTimeColumn])

View solution in original post

Hey!

Do you want a measure or a calculated column?

A measure needs a scalar value, so the EOMONTH() needs to be combined with either MIN() or MAX() to bring it down to a single value. Be aware of the context within the visual. If you have a category that contains multiple dates it will either select  the first date MIN(), or the last date MAX().

The dax for a measure is:

End of month = EOMONTH(MIN(Dates[Date]), 0)
 
If you want a calculated column, you can use:
End of Month (column) = EOMONTH(Dates[Date], 0)

View solution in original post

5 REPLIES 5
collinq
Super User
Super User

Hi @Circuscazz ,

 

The command in Dax for this is the "eomonth" command.  As explained here:

EOMONTH function (DAX) - DAX | Microsoft Learn




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

Proud to be a Datanaut!
Private message me for consulting or training needs.




trebgatte
Most Valuable Professional
Most Valuable Professional

You can also do this in Power Query if needed. I do this a lot with StartOfMonth to group records.

 

Define a custom column with Date.EndOfMonth([YourDateTimeColumn])

collinq
Super User
Super User

Hi @Anonymous ,

 

The command in Dax for this is the "eomonth" command.  As explained here:

EOMONTH function (DAX) - DAX | Microsoft Learn

 

But, if you are doing it in M, then it would be these 5 steps:

collinq_0-1720812642514.png

 

 




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

Proud to be a Datanaut!
Private message me for consulting or training needs.




Anonymous
Not applicable

Sorry DAX measure is needed

Hey!

Do you want a measure or a calculated column?

A measure needs a scalar value, so the EOMONTH() needs to be combined with either MIN() or MAX() to bring it down to a single value. Be aware of the context within the visual. If you have a category that contains multiple dates it will either select  the first date MIN(), or the last date MAX().

The dax for a measure is:

End of month = EOMONTH(MIN(Dates[Date]), 0)
 
If you want a calculated column, you can use:
End of Month (column) = EOMONTH(Dates[Date], 0)

Helpful resources

Announcements
June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors