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
rajendran Super Contributor
Super Contributor

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

Re: DAX - Calculate total for LY minus one day

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

rajendran Super Contributor
Super Contributor

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

Helpful resources

Announcements
Community Kudopalooza

Win Power BI Swag with Community Kudopalooza!

Each week, complete activities and be qualified in the drawing for cool Power BI Swag.

Summit North America

Power Platform Summit North America

Register by September 5 to save $200

Virtual Launch Event

Microsoft Business Applications Virtual Launch Event

Watch the event on demand for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

MBAS Gallery

Watch Sessions On Demand!

Continue your learning in our online communities.

Users Online
Currently online: 288 members 3,095 guests
Please welcome our newest community members: