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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
Anonymous
Not applicable

DAX calculation for the year before last

Hello,

 

I would like to create an equivalent calculation to DATESYTD and SAMEPERIODLASTYEAR, but for the year before last.

1 ACCEPTED SOLUTION
FreemanZ
Super User
Super User

hi @Anonymous 

try like:

measure =
CALCULATE(
   ,
   DATEADD(DateTable[Date], -2, YEAR)
)

View solution in original post

2 REPLIES 2
FreemanZ
Super User
Super User

hi @Anonymous 

try like:

measure =
CALCULATE(
   ,
   DATEADD(DateTable[Date], -2, YEAR)
)

Hi @FreemanZ I am looking for a DAX that will only pull the last year YYYY format and not MM/DD/YYYY.

 

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.