Answer: Let’s break down the function step by step:
CALCULATE: This is a DAX function that modifies the context in which an expression is evaluated. It allows you to apply filters or manipulate the calculation context.
SUM(‘E_Values'[Units]): This function calculates the sum of the ‘Units’ column from the ‘E_Values’ table. It adds up the values of the ‘Units’ column for all the rows in the table.
FILTER(ALL(‘Dates’), ‘Dates'[Date] <= MAX('Dates'[Date])): This function filters the 'Dates' table based on a condition. The condition specified is 'Dates'[Date] <= MAX('Dates'[Date]), which means it will include all the dates that are less than or equal to the maximum date in the 'Dates' table. The ALL function removes any existing filters on the 'Dates' table, ensuring that the filter is applied to all the rows. MAX('Dates'[Date]): This function returns the maximum value from the 'Date' column in the 'Dates' table. It finds the highest date value present in the column. By combining these functions, the overall expression calculates the sum of 'Units' column from the 'E_Values' table, but only for the rows where the date is less than or equal to the maximum date in the 'Dates' table which is set by the dates slicer you have in your report. This effectively gives you the cumulative earned value up to the maximum date in the 'Dates' table.