Discussions
Saved Search Formula to Allow Multiplication
I am using the following formula to determine the units of issue of an item based on the sales unit (Each would be 1, BX/25 would be 25, etc):
NVL2(REPLACE(regexp_replace({saleunit}, '.*?(\w+)$', '\1'),'Each','1'),REPLACE(regexp_replace({saleunit}, '.*?(\w+)$', '\1'),'Each','1'),'1')
When I try and use this number to in a mathematical equation, such as multiplying:
2*(NVL2(REPLACE(regexp_replace({saleunit}, '.*?(\w+)$', '\1'),'Each','1'),REPLACE(regexp_replace({saleunit}, '.*?(\w+)$', '\1'),'Each','1'),'1'))
I get an error. What am I doing wrong?