Goal: Calculate % Achievement (Sales รท Target).
Problem: Some targets are 0 or missing.
Ready...
๐ป DAX Formula
-- Scenario 1: Unsafe Division
MEASURE Pct = Sales[Amt] / Sales[Target]
-- โ ๏ธ Crashes or shows Infinity if Target is 0
-- Scenario 2: Safe Handling
MEASURE Safe_Pct =
IFERROR(
Sales[Amt] / Sales[Target], -- 1. Try this
0 -- 2. If Error, return this
)