What is ODDLYIELD?
ODDLYIELD is a financial function that calculates the yield of a security that has an odd (i.e., non-standard) first period. This function is typically used to calculate the yield of a bond that has an irregular first coupon period.
The function takes in several arguments, including settlement, maturity, last interest date, rate, redemption, frequency, [basis], and [calc_method]. Let’s break down some of the important arguments:
– **Settlement:** This is the date when the security is traded to the buyer.
– **Maturity:** This is the date when the security reaches maturity and the investor receives the principal.
– **Last interest date:** This is the last date when the interest payment was made on the security.
– **Rate:** This is the interest rate of the security.
– **Redemption:** This is the redemption value of the security.
– **Frequency:** This is the number of interest payments per year.
How to Use ODDLYIELD in Power BI
Using ODDLYIELD in Power BI is relatively straightforward. First, you need to make sure that you have a table with the necessary inputs (settlement, maturity, last interest date, rate, redemption, frequency) for the security that you want to calculate the yield for. Once you have this table, you can create a measure using the ODDLYIELD function.
The syntax for the ODDLYIELD function in DAX is as follows:
ODDLYIELD(settlement, maturity, last_interest_date, rate, redemption, frequency[, basis[, calc_method]])
Let’s say that we have a table called “Bond Data” with the following columns:
– **Settlement Date**
– **Maturity Date**
– **Last Interest Date**
– **Coupon Rate**
– **Redemption Value**
We can create a measure called “Odd Yield” using the ODDLYIELD function in the following way:
Odd Yield = ODDLYIELD('Bond Data'[Settlement Date], 'Bond Data'[Maturity Date], 'Bond Data'[Last Interest Date], 'Bond Data'[Coupon Rate], 'Bond Data'[Redemption Value], 'Bond Data'[Frequency])
After creating this measure, we can simply add it to a visual in Power BI to see the calculated yield for each security in our table.
In this article, we’ve learned about the ODDLYIELD function in Power BI and how to use it to calculate the yield of a security with an odd first period. By understanding the syntax and inputs of this function, you can easily create custom measures in Power BI to analyze and visualize your financial data.
Power BI DAX Training Courses by G Com Solutions (0800 998 9248)
Power BI DAX Intensive Training Course£1,050.00 – £26,550.00
Power BI DAX Introduction£395.00 – £9,750.00
Power BI DAX Intermediate£395.00 – £9,750.00
Power BI DAX Advanced£395.00 – £9,750.00