QUOTIENT

How to Use the Power BI DAX function QUOTIENT

Syntax of QUOTIENT Function

The syntax of the QUOTIENT function is as follows:


QUOTIENT(numerator, denominator)


Where,

- **numerator:** This is a required argument and represents the value to be divided.

- **denominator:** This is also a required argument and represents the value by which the numerator is divided.

Example Usage of QUOTIENT Function

Let's understand the usage of QUOTIENT function with the help of an example. Suppose, we have the following data:

| Value 1 | Value 2 |

| --- | --- |

| 10 | 3 |

| 15 | 4 |

| 20 | 5 |

To calculate the integer portion of the division operation between Value 1 and Value 2, we can use the following DAX formula:


QUOTIENT([Value 1], [Value 2])


This will return the following output:

| Output |

| --- |

| 3 |

| 3 |

| 4 |

Using QUOTIENT Function with Rounding

In some cases, we may need to round the result of the QUOTIENT function to the nearest whole number. For example, if we have the following data:

| Value 1 | Value 2 |

| --- | --- |

| 10 | 3 |

| 15 | 4 |

| 20 | 5 |

| 2 | 3 |

To calculate the integer portion of the division operation and round it to the nearest whole number, we can use the following DAX formula:


ROUND(QUOTIENT([Value 1], [Value 2]),0)


This will return the following output:

| Output |

| --- |

| 3 |

| 4 |

| 4 |

| 1 |

Using QUOTIENT Function with IF Statement

In some cases, we may need to use the QUOTIENT function in conjunction with an IF statement to perform conditional calculations. For example, if we have the following data:

| Value 1 | Value 2 |

| --- | --- |

| 10 | 3 |

| 15 | 4 |

| 20 | 5 |

| 2 | 3 |

To calculate the integer portion of the division operation only for those records where Value 2 is greater than 3, we can use the following DAX formula:


IF([Value 2] ❱ 3, QUOTIENT([Value 1], [Value 2]), BLANK())


This will return the following output:

| Output |

| --- |

| 3 |

| 4 |

| 4 |

| BLANK |

The QUOTIENT function is a simple yet powerful function available in Power BI. It can be used to perform integer division operations, round the result to the nearest whole number, or perform conditional calculations using IF statement. By understanding the syntax and usage of QUOTIENT function, you can improve your data analysis and reporting capabilities in Power BI.

Power BI DAX Training Courses by G Com Solutions (0800 998 9248)

Upcoming Courses

Contact Us

    Subject

    Your Name (required)

    Company/Organisation

    Email (required)

    Telephone

    Training Course(s)

    Your Message

    Upload Example Document(s) (Zip multiple files)