cancel
Showing results for 
Search instead for 
Did you mean: 
Reply

DAX - Calculate total for LY minus one day

I need a simple calculation that will give me the count of sales for prior year minus one day (today).

 

Can someone help?

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
rajendran Resident Rockstar
Resident Rockstar

Re: DAX - Calculate total for LY minus one day

Can you try this?

 

CALCULATE(SUM(Sales_Fact.Sales),DATEADD(Dates[Date]-1,-1,YEAR)

 

Thanks
Raj

View solution in original post

2 REPLIES 2
MauriceMecowe Resolver II
Resolver II

Re: DAX - Calculate total for LY minus one day

Measure = DATE(YEAR(NOW())-1,MONTH(NOW()), DAY(NOW()-1))

Highlighted
rajendran Resident Rockstar
Resident Rockstar

Re: DAX - Calculate total for LY minus one day

Can you try this?

 

CALCULATE(SUM(Sales_Fact.Sales),DATEADD(Dates[Date]-1,-1,YEAR)

 

Thanks
Raj

View solution in original post

Helpful resources

Announcements
Announcing the New Spanish Forum

Announcing the New Spanish Forum

Do you need help in Spanish? Check out our new Spanish community section.

April 2020 Community Highlights

April 2020 Community Highlights

Info on our Super Users, MBAS content and badges, and updates to our support articles. - Read the full Community Highlights.

MBAS Gallery 2020

MBAS Gallery 2020

Watch Microsoft Business Applications Summit sessions on-demand.

Top Solution Authors
Top Kudoed Authors