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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
JMSHI007
Regular Visitor

Cumulative Sales Report

Hello All, 

 

I'm new user and new to the PBi community.

I have a problem in getting Previous Year (2021) cumlated sales showing full againest that of YTD 2022 CumSales for my report. 

Anyone can help with right DAX formular? Thanks! 

 

Here is the report: 

JMSHI007_2-1660097196415.png

 

Here is the Formular: 

JMSHI007_1-1660097122180.png

 

2 REPLIES 2
amitchandak
Super User
Super User

@JMSHI007 , Try a measure like

 

Last YTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESYTD(dateadd('Date'[Date],-1,Year),"12/31"))

 

Cumm Sales = CALCULATE(SUM(Sales[Sales Amount]),filter(allselected(date),date[date] <=max(date[Date])))

 

Cumm year behind

Cumm Sales =

var _max1 = max(date[Date])

var _max = date(year(_max1)-1, month(_max1), day(_max1))

return

CALCULATE(SUM(Sales[Sales Amount]),filter(allselected(date),date[date] <=_max))

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

@amitchandak 

Thanks you for your fast reply. 

I've applied your solution, it works with pending issue still. 

It gives me all 4 years YTDcumulated instead of Y2021.

We already fix year-reset per year before. 

JMSHI007_0-1660106787086.png

Thank you so much. 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.