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
Write Units per Line: the items sold divided by the number of order lines, with DIVIDE. It is checked for each store.
All lessons in Power BI Basics
2Your First Measures
What a Measure IsCounting RowsAverage, Min and MaxCounting Distinct ThingsMeasures Can Do MathSafe Division with DIVIDEMeasures Use Other MeasuresRecap - The Numbers Mia Wants