Sample Data
This table shows numerators and denominators for division. Some denominators are zero to test safe division.
| Cell | Value |
|---|---|
| A1 | Numerator |
| B1 | Denominator |
| A2 | 100 |
| B2 | 20 |
| A3 | 50 |
| B3 | 0 |
| A4 | 0 |
| B4 | 10 |
This table shows numerators and denominators for division. Some denominators are zero to test safe division.
| Cell | Value |
|---|---|
| A1 | Numerator |
| B1 | Denominator |
| A2 | 100 |
| B2 | 20 |
| A3 | 50 |
| B3 | 0 |
| A4 | 0 |
| B4 | 10 |
DIVIDE(A2, B2, 0)A B 1 Numerator Denominator 2 100 --> 20 3 50 --> 0 4 0 --> 10
A B C 1 Numerator Denominator Result 2 100 20 5 3 50 0 0 4 0 10 0
DIVIDE function in Power BI?DIVIDE function in DAX?Result = DIVIDE(SUM(Sales[Amount]), SUM(Sales[Quantity]), 0)
SUM(Sales[Quantity]) is zero?SafeRatio = DIVIDE(SUM(Sales[Amount]), SUM(Sales[Quantity]))
DIVIDE to achieve this?Pass the test and this pattern moves unknown