an item can have many units of measure.
It's best to set he base unit of measure as the smallest possible qty.
So I would ask is BAG the smallest it can be?
If yes then create a unit of measure "BAG" = 1
make that the "base uom"
then add another unit of measure "pallet" = 12
now depending on how it's usually sold & bought you can default the "sales uom" & "purchase uom" fields to the proper uom code
calculate all your costs & prices based on the "base uom"
so now when you enter a sales order for this item you can change the base uom to whichever you need and it will calculate correctly.
example/ if you enter that item as 12 bags and enter it again as 1 pallet - it should all calculate the same.
if someone wants a pallet and a half you can enter 1 line of 18 bags or 2 lines - 1 pallet & 6 bags