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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
HusseinKhalil
Helper I
Helper I

Cumilative and date table connection to multibe date columns

i have a set of data with two date columns, one for the forecast other for actual. i am trying to calcuate the cumulative/running total of a column with unquie sales ID with the below formulas

 

Forecast//CALCULATE(COUNT(test[SN]),FILTER(test,test[Forecast]<=EARLIER(test[Forecast])))

 

Actual//CALCULATE(COUNT(test[SN]),FILTER(test,test[Actual]<=EARLIER(test[Actual])))

 

as shoown in the excel file tab for pivot, caclulations are not correct, firstly both calculated columsn result in same output. secondly, calculations gives monthly based incremental figure not month over month.

 

i have a claendar date column which is connected to both two date columns in the original data set.

please advise 

 

Link for the file 

 

https://www.dropbox.com/scl/fi/a1rzgcj92l21ty8mubvdb/Data.xlsx?dl=0&rlkey=u0iy25wsgr2pfxmtgaejwa5pw

1 REPLY 1
AllisonKennedy
Super User
Super User

If you are wanting a running total you should use SUM, not COUNT and you should do this on the Sales Value. You can do SUMX(FILTER(test,test[Forecast]<=EARLIER(test[Forecast]),test[SN])

Please @mention me in your reply if you want a response.

Copying DAX from this post? Click here for a hack to quickly replace it with your own table names

Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C

I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 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.