The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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.