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
ANP
Frequent Visitor

Date Age Calculation... help needed

Hello all, new to power bi.. I have one date type column logged date .. I want to create one new column named Age which says difference between logged date and a constant which is End of month of the maximum available logged date in the column. I tried both in power query editor or power bi desktop but unable to achieve.. what I could got the difference between logged date and End of month of that particular date.. Eg . Logged date lets say 1 Oct 2022 , 10 nov 2022 then Age column should have 60 and 20 respectively correctly.. what I am getting is 29 and 20.. hope that is clear. basically the second parameter in DATEDIFF , I am unable to make it a constant. Thanks in advance 🙂

1 ACCEPTED SOLUTION
Manoj_Nair
Solution Supplier
Solution Supplier

@ANP - try this calculated column DAX for getting EOM value.  

Manoj_Nair_0-1670026782188.png

If this resolves your query, please accept this as a solution. Thanks

View solution in original post

3 REPLIES 3
Manoj_Nair
Solution Supplier
Solution Supplier

@ANP - try this calculated column DAX for getting EOM value.  

Manoj_Nair_0-1670026782188.png

If this resolves your query, please accept this as a solution. Thanks

Thanks Manoj it worked

djurecicK2
Super User
Super User

Hi @ANP ,

 You might consider adapting something like this date table with built in end-of month values.

https://radacad.com/all-in-one-script-to-create-calendar-table-or-date-dimension-using-dax-in-power-...

 

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.