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
MaleneL
Helper I
Helper I

Last date last Year DAX

Hi All
hope you can help me, and I have probely overlooked a simpel solution.

I need to get the last date for last year into a tavel in Desktop by DAX, 

so if I have 

02-02-20223  then 31-12-2022

05-06-2023 then    31-12-2022

04-05-2022 then 31-12-2021

 

and so on any 

pls help ;O)

Malene

1 ACCEPTED SOLUTION
Ritaf1983
Super User
Super User

Hi @MaleneL 
Try this DAX formula in calculated column : 

Last date LY = date(YEAR('Table'[Date])-1,12,31)
Ritaf1983_0-1687167007865.png

If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly

View solution in original post

3 REPLIES 3
MaleneL
Helper I
Helper I

YES!! it work, I must have done something wrong, because I had tryed with that but it didn't work.

 

Thank you!

Happy to help 🙂

Ritaf1983
Super User
Super User

Hi @MaleneL 
Try this DAX formula in calculated column : 

Last date LY = date(YEAR('Table'[Date])-1,12,31)
Ritaf1983_0-1687167007865.png

If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly

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.