In a saved search, what formula works to achieve “...
# general
l
In a saved search, what formula works to achieve “sum the on hand quantities of each distinct location in the results”? For example, INV01 - Item A - Location A - Loc Qty On Hand is 100 INV02 - Item A - Location A - Loc Qty On Hand is 100 INV03 - Item A - Location B - Loc Qty On Hand is 75 When I group the results, I was hoping to get 175 in the Loc Qty On Hand but struggling to do so because I’m not sure how to tell NS to only include the value per unique location once.
m
What is INV01 and INV02?
Is this a transaction search?
You can try to create a hash of item-location (ie {item} || ‘-‘ || {locaition}). Then use DISTINCT on that hash to only pull distinct values
l
Yes, a transaction saved search
m
I use this on an item search. I get a line for each item with a column for each location. You need to Group the item and apply a summary to the formula (I use MAX). CASE WHEN {inventorylocation} = 'Location A' THEN {locationquantityavailable} ELSE 0 END
That's for available. On hand would be {locationquantityonhand}
l
Thank you all. I'll try that.