Discussions
Join the NetSuite community to innovate, connect, and discover what’s next.
SuiteWorld brings thousands of innovators, builders, and leaders together to learn, connect, and shape what’s next. This October, explore how to build a stronger foundation for growth through inspiring keynotes, major product reveals, hands-on sessions, and unforgettable moments—all in one place for our biggest event of the year. Register now
Sum of two case statements for item quantity?
So I have two simple case statements that help me see inventory by location. When separating the formulas, I can see the proper numbers in each column.
Formula (Numeric) --> CASE WHEN {inventorylocation.namenohierarchy}= 'Los Angeles' THEN {locationquantityavailable} END
Formula (Numeric) --> CASE WHEN {inventorylocation.namenohierarchy}= 'Phoenix' THEN {locationquantityavailable} END
But when I try to add the two case statements together, I only get a blank value.
(CASE WHEN {inventorylocation.namenohierarchy}= 'Los Angeles' THEN {locationquantityavailable} END) + (CASE WHEN {inventorylocation.namenohierarchy}= 'Phoenix' THEN {locationquantityavailable} END)
In case you are wondering why I do not pull the "Available" column, we have additional warehouses under the one subsidiary that I need to exclude that would have otherwise been included when searching the "Available" field.