E10 BAQ Calculated Field multiple If then Else

Hello

I am trying to convert a Vantage BAQ Calculated Field into an E10 Calculated Field and understand that I now need to use the case statement, however i cannot get it to work I am a complete novice where coding is.

Current Vantage Calculated Field

IF (Part.CostMethod) = “S” then (PartCost.StdBurdenCost)+(PartCost.StdLaborCost)+(PartCost.StdMaterialCost)+(PartCost.StdMtlBurCost)+(PartCost.StdSubContCost) ELSE IF(Part.CostMethod) = “A” then (PartCost.AvgBurdenCost)+(PartCost.AvgLaborCost)+(PartCost.AvgMaterialCost)+(PartCost.AvgMtlBurCost)+(PartCost.AvgSubContCost) ELSE 0

My E10 statement

case when Part.CostMethod = ‘S’ then (PartCost.StdBurdenCost + PartCost.StdLaborCost + PartCost.StdMaterialCost + PartCost.StdMtlBurCost + PartCost.StdSubContCost) else
case when Part.CostMethod = ‘A’ then (Part.AvgLaborCost + PartCost.AvgBurdenCost + PartCost.AvgMaterialCost + PartCost.AvgSubContCost + PartCost.AvgMtlBurCost) else 0 end

the error I get is not helping me at all :slight_smile:

Thanks in advance

case
	when Part.CostMethod = ‘S’ then (PartCost.StdBurdenCost + PartCost.StdLaborCost + PartCost.StdMaterialCost + PartCost.StdMtlBurCost + PartCost.StdSubContCost)
	when Part.CostMethod = ‘A’ then (Part.AvgLaborCost + PartCost.AvgBurdenCost + PartCost.AvgMaterialCost + PartCost.AvgSubContCost + PartCost.AvgMtlBurCost)
	else 0
end
4 Likes

Brilliant, thank you very much