Ratios such as profit margin or average order value divide one measure by another. You could write [Profit] / [Total Sales], but when the bottom number is zero, the slash operator returns Infinity or NaN, and those show up in your visuals. DIVIDE returns a blank instead, or a value you pass as a third argument:
Profit Margin = DIVIDE([Profit], [Total Sales])
A ratio comes out as a decimal, such as 0.46. Don't multiply it by 100. Select the measure and, in Measure tools, set Format to Percentage, so it shows as 46.00%.
Ratios are where measures beat implicit aggregations. Power BI evaluates the measure separately for each row and for the total, so the total is a true margin, not a sum or an average of the row margins.