ROUNDUP

How to Use the Power BI DAX function ROUNDUP

What is the ROUNDUP Function in Power BI?

The ROUNDUP function in Power BI is a DAX function that rounds a number up to a specified number of decimal places. The function takes two arguments: the number to be rounded, and the number of decimal places to round to. The syntax for the ROUNDUP function is as follows:


ROUNDUP(number, num_digits)


How to Use the ROUNDUP Function in Power BI

Using the ROUNDUP function in Power BI is easy. Follow these steps:

1. Open Power BI and create a new report.

2. Select the table or column that contains the number you want to round up.

3. Click on the "New Measure" button in the "Modeling" tab.

4. In the formula bar, type the following formula:


My Measure = ROUNDUP([My Column], 2)


5. Replace "My Column" with the name of the column that contains the number you want to round up.

6. Replace "2" with the number of decimal places you want to round up to.

7. Press Enter to create the measure.

Your new measure will now appear in the "Fields" pane, and you can use it in your visualizations like any other measure.

Examples of Using the ROUNDUP Function in Power BI

Let's look at a few examples of how to use the ROUNDUP function in Power BI.

Example 1: Rounding Up to Two Decimal Places

Suppose you have a table that contains sales data, and you want to round the sales amounts up to two decimal places. Here's how you would do it:

1. Select the sales amount column.

2. Click on the "New Measure" button in the "Modeling" tab.

3. In the formula bar, type the following formula:


Sales Rounded Up = ROUNDUP([Sales Amount], 2)


4. Press Enter to create the measure.

Now, the "Sales Rounded Up" measure will round up the sales amounts to two decimal places, and you can use it in your visualizations.

Example 2: Rounding Up to Whole Numbers

Suppose you have a table that contains the number of units sold for each product, and you want to round the units up to the nearest whole number. Here's how you would do it:

1. Select the units sold column.

2. Click on the "New Measure" button in the "Modeling" tab.

3. In the formula bar, type the following formula:


Units Rounded Up = ROUNDUP([Units Sold], 0)


4. Press Enter to create the measure.

Now, the "Units Rounded Up" measure will round up the units sold to the nearest whole number, and you can use it in your visualizations.

The ROUNDUP function in Power BI is a powerful tool that allows you to round a number up to a specified number of decimal places. By following the steps outlined in this article, you can easily create measures that use the ROUNDUP function to round up your data. So next time you need to round up a number in Power BI, remember to use the ROUNDUP function!

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)