I am trying to use the formula function to add a column for "Item Retail" = Sales/Sales qty
If there is no sales, show "zero" instead of "#DIV/0!"
The data type is "double"
Item | Sales | Sales Qty | Item retail |
Apple | 1500 | 300 | 5 |
Banana | 3400 | 2500 | 1.36 |
Pear | 0 | 0 | #DIV/0! |
Here is what I entered in the SQL expression under IDB enviroment...
if "Daily QTY"=0 Then "Item Retail"=0, Else"Item Retail" = Daily POS"/"Daily QTY" Endif
but I continue having syntax errors for this formula when running under In database...
Unknow variable "Item Retail"
Did I miss any steps?
Thank you.