Menu
CoddyTech

Safe Division with DIVIDE

Part of the Power BI Basics section of Coddy's Power BI journey. Lesson 12 of 28.

x / 0 gives Infinity. DIVIDE returns blank instead, so the visual shows nothing.

Units per Line = DIVIDE(SUM(Sales[Quantity]), COUNTROWS(Sales))

Top first, then bottom. DIVIDE(a, b, 0) shows 0 instead of blank.

challenge icon

Challenge

Easy

Write Units per Line: the items sold divided by the number of order lines, with DIVIDE. It is checked for each store.

Try it yourself

Units per Line =
StoreUnits per Line
Lisbon Riverside
Porto Ribeira
Madrid Centro
Barcelona Gracia
Berlin Mitte
Total
Fields
  • Sales
  • Products
  • Stores
    • StoreID
    • Store
    • City
    • Country
    • OpenDate
  • Customers
  • Dates
  • Targets

All lessons in Power BI Basics