ODD

ODD

How to Use the Power BI DAX function ODD

In this article, we will discuss the ODD function in DAX and learn how to use it in Power BI.

What is the ODD function in DAX?

The ODD function in DAX is used to round a number up to the nearest odd integer. The syntax for the ODD function is as follows:


ODD(❰number❱)


The argument for the ODD function is the number that you want to round up to the nearest odd integer. The ODD function returns the rounded number.

How to use the ODD function in Power BI

To use the ODD function in Power BI, follow these steps:

1. Open the Power BI Desktop application and create a new report.

2. Connect to the data source and import the data that you want to analyze.

3. Create a new measure by clicking on the "New Measure" button in the "Modeling" tab.

4. Enter the following formula in the formula bar:


Rounded Value = ODD(❰number❱)


Replace ❰number❱ with the name of the column or measure that contains the number that you want to round up to the nearest odd integer.

5. Press Enter to apply the formula. The new measure will be added to the fields list.

6. Drag and drop the new measure onto a visual to display the rounded value.

Example

Let's say that you have a table that contains a column called "Sales" that contains the following values:


100.25

50.75

25.50


You want to round up the values in the "Sales" column to the nearest odd integer. Here is how you can do it using the ODD function in Power BI:

1. Create a new measure by clicking on the "New Measure" button in the "Modeling" tab.

2. Enter the following formula in the formula bar:


Rounded Sales = ODD(Sales)


3. Press Enter to apply the formula. The new measure will be added to the fields list.

4. Drag and drop the "Rounded Sales" measure onto a visual to display the rounded values.

The result will be:


101

51

27


The ODD function in DAX is a powerful tool that can be used to round up numbers to the nearest odd integer. This function can be very useful in situations where you need to analyze data that is best displayed as an odd number. With the steps outlined in this article, you should be able to use the ODD function in Power BI and take advantage of its many benefits.

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)

Copyright, G Com Solutions Ltd, 2024.
Tower Bridge Business Centre, 46-48 East Smithfield, London E1W 1AW
0800 998 9248   |   9:00 a.m. till 5:30 p.m.

Connect With Me: