How to track 2 different quantities for one item?

How to track 2 different quantities for one item?

We work on textile goods. We receive pieces which contain meters of goods and we sell based on per meter. I looked at this query: https://help.zoho.com/portal/community/topic/secondary-units-for-quantity-in-zoho-books but I don't want the pieces to affect the meters. I want to track pieces and meters separately for one item while the price is based only on the meters. I tried using a custom field for the pieces, but the pieces do not track and stay the same even after a certain amount is sold.