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!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
Rolling Sum = var object_1 = Calculate(SUM('Table 1'[Value]), Filter(allselected('Table 1'), COUNTROWS(FILTER('Table 1', EARLIER('Table 1'[Date])<= 'Table 1'[Date])))) var object_2 = Calculate(SUM('Table 2'[Value]), Filter(allselected('Table 2'), COUNTROWS(FILTER('Table 2', EARLIER('Table 2'[Date])<= 'Table 2'[Date])))) return calculate(object_1 - object_2, Filter(allselected('Date Table'), COUNTROWS(FILTER('Date 2', EARLIER('Date Table'[Date])<= 'Date Table'[Date]))))
I am trying to create a rolling sum from the results of a calculation between two values (object_1 and object_2). The problem is when i try to achieve this by using the calculate function + the earlier function, it doesn't seem to have any affect.
I have tried creating a virtual table with the values i am trying to create a rolling sum out of (using Summarize), then using earlier in a Sumx function to create the desired effect but this did not work.
Hi @Kote101 ,
Could you please share your sample data and excepted result to me if you don't have any Confidential Information. Please upload your files to One Drive and share the link here.