The FILTER statement creates a table so Hit New Table in powerbi and paste in that part of the statement. You can use a variable instead of SELECTEDVALUE ( 'Events'[End Date/Time]) - hardcode the value to be a datetime you have in the table.
You filter the data to find the last 3 values based on some ordering (either an index or a date field) and then sum the values. If the ordering is regular, it can be simpler e.g. index of 1,2,3,4 but otherwise you might have to use TOPN