A margin for a group divides aggregate profit by aggregate revenue. It differs from the average of row margins when order sizes differ. A number measure can reference the existing sum measures and use NULLIF to protect a zero denominator. Keep the result as a ratio; formatting it as a percentage is a separate decision. Test a narrow group as well as the overall business.
Use the field picker and the generated result together. The warehouse contains repeated customer keys, orders with several items and missing values. Those rows make a plausible-looking total insufficient evidence. Run the requested definition, inspect its grain, and use the feedback to locate the mismatch. Every dataset here is fictional.
Calculate a margin from aggregate measures.