-- Eager Evaluation DEFINE MEASURE Jobs[Gross Profit] = SUM ( Jobs[Gross Profit] ) MEASURE Jobs[Total Estimate] = SUM ( Jobs[Estimate] ) MEASURE Jobs[Total Invoiced] = SUM ( Jobs[Invoiced] ) EVALUATE VAR AvgEstimate = [Total Estimates] / DISTINCTCOUNT ( Jobs[Loss Type] ) RETURN ADDCOLUMNS ( VALUES ( Jobs[Loss Type] ), "Something", VAR GrossProfit = [Gross Profit] VAR TotalEstimate = [Total Estimate] RETURN IF ( GrossProfit * 1.4 > AvgEstimate, TotalEstimate, GrossProfit ) ) DEFINE MEASURE Jobs[Gross Profit] = SUM ( Jobs[Gross Profit] ) MEASURE Jobs[Total Estimate] = SUM ( Jobs[Estimate] ) MEASURE Jobs[Total Invoiced] = SUM ( Jobs[Invoiced] ) EVALUATE ADDCOLUMNS ( VALUES ( Jobs[Loss Type] ), "Something", VAR GrossProfit = [Gross Profit] VAR TotalEstimate = [Total Estimate] RETURN SWITCH ( TRUE (), Jobs[Loss Type] = "a", GrossProfit, TotalEstimate ) )