Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
i sum 2 expressions together to calculate a value, but in the 2 expressions there are several mutual elements.
Is there a way to write this simpeler and perhaps more effective?
sum ({< ProductStatus = {'Active', 'Einde gamma', 'Sample'}, OrderStatus= {'On hold'},OnHoldReason={'Treated - waiting for client','Treated - waiting for payment','Treated - waiting for payment'} >} OrderQtyOpen*SkuPricePurchaseCurrency) +
sum ({< ProductStatus = {'Active', 'Einde gamma', 'Sample'}, OrderStatus= {'Placed'} >} OrderQtyOpen*SkuPricePurchaseCurrency)
thanx!
Chris
Can you tell us what you getting the output value? May be try this?
= sum ({< ProductStatus = {'Active', 'Einde gamma', 'Sample'}, OrderStatus = P({< OrderStatus = { 'On hold'},
OnHoldReason= { 'Treated - waiting for client',
'Treated - waiting for payment',
'Treated - waiting for payment'
}
>}OrderStatus
),
OrderStatus= {'Placed'} >} OrderQtyOpen*SkuPricePurchaseCurrency)
Not sure, but you can try this if the two set analysis doesn't overlap:
Sum({<ProductStatus = {'Active', 'Einde gamma', 'Sample'}, OrderStatus = {'On hold'}, OnHoldReason = {'Treated - waiting for client','Treated - waiting for payment','Treated - waiting for payment'}>+< ProductStatus = {'Active', 'Einde gamma', 'Sample'}, OrderStatus = {'Placed'}>} OrderQtyOpen*SkuPricePurchaseCurrency)