Ravindra BagaleCourses & study guides

8. Adding Columns: Power Query Add Column Tab and DAX Calculated Columns

8.5 Conditional Column

If–then–else rules without code. Covered with a data-quality example in Module 7.16. Here is a business example, Basket Size:

Steps in Power BI

  1. Add Column › Conditional Column › New column name: Basket Size.
  2. If Amount is less than 199 → Small.
  3. Add Clause: Else If Amount is less than 499 → Medium.
  4. Else → Large › OK.
  5. The Operator list changes by type (text: begins with, contains, equals; numbers: is greater than …). The Value/Output boxes can also refer to a column or a parameter (click the ABC123 drop-down).

Aata pudhe jaauya Index Column kade.

Ravindra Bagale's Tip

Mitrano, lakshat theva: rules are checked top to bottom, and the first match wins. Writing "< 499 → Medium" before "< 199 → Small" makes every small basket Medium. Order the rules from the smallest threshold upward and test boundary values like 199 and 200. Ha niyam lakshat theva.