The correct syntax for using the RELATED() function within an IF condition in Power BI is:
NewColumn = IF(RELATED(Table[Column]) = "Value", "TrueResult", "FalseResult")
Example:
If you want to create a new column that checks if a related Category column equals "High" and returns "Priority" or "Normal" based on that:
PriorityFlag = IF(RELATED(Products[Category]) = "High", "Priority", "Normal")
Use Cases:
- Conditional Labeling: Apply different labels or categories based on related data from another table.
- Dynamic Calculations: Modify calculations or metrics depending on values in related tables (e.g., adjusting pricing or discounts based on product category).