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

Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers. Get Fabric certified for FREE! Learn more

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
March PBI video - carousel

Power BI Monthly Update - March 2025

Check out the March 2025 Power BI update to learn about new features.

March2025 Carousel

Fabric Community Update - March 2025

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

Top Solution Authors