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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Chamalpam
Frequent Visitor

Cannot manipulate Date measure

Dear PowerBI Experts,

 

I have below date measure

End_Date = Date (year(2023),month(01),day(31))

 

And below measure

New_Date = DATE(YEAR([End_Date]),MONTH(([EndDate])-5),DAY([EndDate]))
 
The result i want is the date to appear as 30.09.2022 however i cannot seam to get this working. Any Advise?
 
Please help!
 

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Chamalpam , Try

 

eomonth([End Date], -5)

 

or

 

eomonth([End Date], -4)

View solution in original post

3 REPLIES 3
amitchandak
Super User
Super User

@Chamalpam , Try

 

eomonth([End Date], -5)

 

or

 

eomonth([End Date], -4)

This works. Thank you very much @amitchandak 

Thank you @amitchandak . It worked! I have typed it wrong the result i am looking for is 30.09.2022. 

 

the result i am getting is 30.09.2023

 

it should also work if the end_date is as below

End_Date = Date (year(2022),month(12),day(31))

 

result should be 31.08.2022

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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