Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
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
Solved! Go to Solution.
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:
Proud to be a Datanaut!
Private message me for consulting or training needs.
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])
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:
Hi @Circuscazz ,
The command in Dax for this is the "eomonth" command. As explained here:
EOMONTH function (DAX) - DAX | Microsoft Learn
Proud to be a Datanaut!
Private message me for consulting or training needs.
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])
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:
Proud to be a Datanaut!
Private message me for consulting or training needs.
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:
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 19 | |
| 9 | |
| 8 | |
| 7 | |
| 6 |