Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello everybody,
I would like to write an expression that counts customers who placed orders worth more than 150 in a certain time frame.
I wrote this expression but it is wrong because the symbol " is repeated several times:
Sum({$< customer_id={"=Sum({$<OrderDate={">=$(=Date(vStartDate))<=$(=Date(vEndDate))"}>} Amount)>150"} >} oneCustomer)
What is the correct syntax to get the desired result?
Thanks in advance
Hello Stefano
You can escape the quotes by preceding with another qoute (below in red)
Sum({$< customer_id={"=Sum({$<OrderDate={"">=$(=Date(vStartDate))<=$(=Date(vEndDate))""}>} Amount)>150"} >} oneCustomer)
Christos K.
Hello Stefano
You can escape the quotes by preceding with another qoute (below in red)
Sum({$< customer_id={"=Sum({$<OrderDate={"">=$(=Date(vStartDate))<=$(=Date(vEndDate))""}>} Amount)>150"} >} oneCustomer)
Christos K.
It's not a real set analysis else an if-loop and therefore it's better to apply a classical syntax instead of including it with a nested logic into the set analysis. This means something like this:
if(Sum({$<OrderDate={">=$(=Date(vStartDate))<=$(=Date(vEndDate))"}>} Amount)>150,
Sum(oneCustomer))
Thank you Christos , your reply is correct!