Allows re-use of logic in complex expressions by declaring expression-level variables, initializing them and re-using them in the expression.
Let(variable declarations,expression body)
Let(Dim [AvgPrice] As Float = LookupValue(0,
[Categories.CategoryName],1,Select
[Categories.CategoryName],[OrderDate: Avg: UnitPrice]
from [All]) Dim [TotalQuantity] As Float = LookupValue(0,[Categories.CategoryName],1,Select [Categories.CategoryName],[OrderDate: Sum: Quantity]
from [All]), IIF([AvgPrice]<25,25,[AvgPrice])*[TotalQuantity])