..

In situations where you don’t want the standard evaluation behaviour in Power BI, you can use the CALCULATE and/or USERELATIONSHIP functions. However, more circumstances exist where you don’t want the standard behaviour. Standard measures are simple concepts, where they might use the SUM, AVERAGE, MIN, and MAX functions. Thus far, you’ve been using SUM for the Total Sales measure.

You can use the CALCULATE function to complete this action, along with the LastDate function, as shown in the following example:

Last Inventory Count =CALCULATE (SUM ( 'Warehouse'[Inventory Count] ),LASTDATE ( 'Date'[Date] ))

This approach will stop the SUM from crossing all dates. Instead, you will only use the SUM function on the last date of the time period, thus effectively creating a semi-additive measure.