Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hi,
I am trying to display previous count total based on the date column. I have a column called marks along with dates. I am trying to sum the marks column based on the previous dates but it is giving me rolling sum of all the previous dates to the current date.
Screenshot:
Here instead of 1437 i should get 800 which is previous date total
I am attaching the sample pbix file with the data and calculation so somebody can help me to fix the issue?
@lbendlin @rajendraongole1 @Ritaf1983 @SamWiseOwl @FreemanZ @vojtechsima @sandeepsai @johnt75
Regards
Vivek N
Solved! Go to Solution.
Hello, @vivek280393
The attachment didn't go trought, so I made myself some data:
prev_marks =
var currentDate = 'Table'[date]
var _previousDay = MAXX(FILTER(ALL('Table'), 'Table'[date]< currentDate), 'Table'[date])
var _previousDay_value = MAXX(FILTER(ALL('Table'), 'Table'[date]= _previousDay), 'Table'[total_marks])
return _previousDay_value
Hello, @vivek280393
The attachment didn't go trought, so I made myself some data:
prev_marks =
var currentDate = 'Table'[date]
var _previousDay = MAXX(FILTER(ALL('Table'), 'Table'[date]< currentDate), 'Table'[date])
var _previousDay_value = MAXX(FILTER(ALL('Table'), 'Table'[date]= _previousDay), 'Table'[total_marks])
return _previousDay_value
Hi @vojtechsima
Thanks your solution worked. Now i am facing another issue for a similar case. Please check the below screenshot, I am trying to calculate the previous average percentage column based on reporting date and system name columns. Previously it was only with reporting date and now i have to consider system name also while calculating the previous average percentage. I tried your approach and modified to make it work but getting error? can you please check and let me know where i am going wrong here?
Regards
Vivek N
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!