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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

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
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.