The Last Costs can be calculated as

Last Costs:=CALCULATE(SUM([StdCost]),

LASTNONBLANK('Table'[EffectiveDAte], SUM([StdCost]))

)

the previous last cost can be calculated as

Pre Last Costs:=CALCULATE([Last Costs],

FILTER(ALL('Table'[EffectiveDate]),

'Table'[EffectiveDate] < MAX('Table'[EffectiveDate]))

)

hth,

gerhard

Gerhard Brueckl

blogging @ http://blog.gbrueckl.at

working @ http://www.pmOne.com