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
Super User
Super User

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

2 REPLIES 2
Highlighted
MauriceMecowe Regular Visitor
Regular Visitor

Re: DAX - Calculate total for LY minus one day

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

Super User
Super User

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