ODDFPRICE

How to Use the Power BI DAX function ODDFPRICE

What is the ODDFPRICE function?

The ODDFPRICE function is a financial function in Power BI that is used to calculate the price of a security with an odd first period. It takes into account the number of days in the first period and the number of days in the second period to calculate the price of the security.

How to use the ODDFPRICE function in Power BI

To use the ODDFPRICE function in Power BI, you need to follow these steps:

1. Open Power BI and create a new report.

2. Go to the “Home” tab and click on “New Measure”.

3. In the “New Measure” dialog box, enter a name for your measure and select “Advanced” from the “Format” drop-down menu.

4. In the “Advanced” dialog box, enter the following formula:


5. Replace the placeholders in the formula with the appropriate values.

6. Click on “OK” to create your measure.

7. Insert the measure into your report and use it as required.

Understanding the ODDFPRICE function formula

The ODDFPRICE function formula takes the following arguments:

– **settlement**: The settlement date of the security.

– **maturity**: The maturity date of the security.

– **issue**: The issue date of the security.

– **first_coupon**: The date of the first coupon payment.

– **rate**: The annual coupon rate of the security.

– **yld**: The annual yield of the security.

– **frequency**: The number of coupon payments per year.

– **basis**: The day count basis to use for the calculation.

Examples of using the ODDFPRICE function in Power BI

Let’s take a look at some examples of using the ODDFPRICE function in Power BI:

Example 1

Suppose we have a security with the following details:

– Issue date: January 1, 2020

– Maturity date: December 31, 2025

– Annual coupon rate: 6%

– Annual yield: 5%

– Coupon frequency: Semi-annual

– Day count basis: Actual/360

We want to calculate the price of the security as of January 1, 2020. The settlement date is also January 1, 2020.

To do this, we can use the following ODDFPRICE formula:


The result will be the price of the security as of January 1, 2020.

Example 2

Suppose we have a security with the following details:

- Issue date: January 1, 2020

- Maturity date: December 31, 2025

- Annual coupon rate: 6%

- Annual yield: 5%

- Coupon frequency: Semi-annual

- Day count basis: Actual/360

We want to calculate the price of the security as of July 1, 2020. The settlement date is also July 1, 2020.

To do this, we can use the following ODDFPRICE formula:


The result will be the price of the security as of July 1, 2020.

The ODDFPRICE function is a powerful tool that can be used in Power BI to calculate the price of a security with an odd first period. It is important to understand the formula and the arguments that are required to use this function effectively. By following the steps outlined in this article, you can use the ODDFPRICE function to perform financial analysis 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)