IF Statement
Basic conditional logic
Sales Category = IF([Total Sales] > 1000, "High", "Low")
Switch Statement
Multiple condition evaluation
Quarter = SWITCH(MONTH('Date'[Date]), 1,2,3, "Q1", 4,5,6, "Q2", 7,8,9, "Q3", "Q4")
IF Error
Handle errors gracefully
Safe Division = IFERROR(DIVIDE([Sales], [Units]), 0)
Is Blank
Check for blank values
Has Description = IF(ISBLANK(Product[Description]), "No", "Yes")
AND Logic
Multiple conditions must be true
Premium Customer = IF(AND([Total Sales] > 5000, [Orders] > 10), "Premium", "Standard")
OR Logic
Any condition can be true
Active Customer = IF(OR([Recent Order] = TRUE, [Last Contact] < 30), "Active", "Inactive")
NOT Logic
Negate condition
Not Returned = IF(NOT(ISBLANK(Sales[OrderID])), [Total Sales], 0)
Has One Value
Check if column has single value in context
Single Product = IF(HASONEVALUE(Product[ProductName]), VALUES(Product[ProductName]), "Multiple")