I am trying to write a DAX formula where it sums a measure where it use only the records where the column Site = "OSK", the column Group <> Manufactur and where the date of records used is the LastDate.

Here is the formula.

=calculate(sum('StandardCost'[CostPerUnit]),StandardCost[Site]="OSK",StandardCost[Group]<>"Manufactur",LastDate('StandardCost'[Date]))

The LastDate statement does not find the LastDate as limited by Site and Group. It finds the LastDate of the group ignoring those filters.

Can someone tell me what I am doing wrong?

Thanks!

Mike Ward