Dax Function: COUPPCD

Category: Financial Functions

The COUPPCD function in Power BI returns the previous coupon date before the settlement date of a bond. It is used in financial modeling involving fixed-income securities that pay interest periodically.

Purpose

  • Identifies the last coupon payment date before the investor purchases the bond.

  • Useful for calculating accrued interest, amortization, and creating bond payment schedules.

Type of Calculations

  • Performs date-based financial calculations using settlement, maturity, and coupon frequency.

  • Determines the closest prior coupon payment from the perspective of the settlement date.

Practical Use Cases

  • Accrued Interest Calculation: Determines the interest accrued from the previous coupon.

  • Bond Pricing Models: Required for accurate present value or cash flow calculations.

  • Investment Dashboards: Shows last income event for bonds in a portfolio.


COUPPCD(settlement, maturity, frequency, [basis])

 
ParameterTypeDescription
settlementDateThe bond’s settlement date (purchase date). Must be after issue but before maturity.
maturityDateThe bond’s maturity date.
frequencyIntegerNumber of coupon payments per year:
1 = Annual
2 = Semiannual
4 = Quarterly
basis (optional)IntegerType of day count basis:
0 = US (NASD) 30/360 (default)
1 = Actual/Actual
2 = Actual/360
3 = Actual/365
4 = European 30/360


How Does
 Dax Function Works

COUPPCD back-calculates from the settlement date using the maturity date and the coupon frequency to determine when the previous payment occurred.

Example Concept:

  • Settlement: 2024-07-15

  • Maturity: 2027-07-15

  • Frequency: 2 (semiannual)

Bond pays every 6 months → Previous coupon date = 2024-01-15

What Does It Return?

  • Returns a date value representing the last coupon payment date before the given settlement date.

  • The result is affected by frequency and basis.

When Should We Use It?

Use COUPPCD when you need to:

  • Determine days since the last coupon for interest calculations.

  • Build payment schedules for reporting.

  • Visualize or filter investments based on last interest payment.

Examples

Basic Usage :


COUPPCD(DATE(2024, 7, 15), DATE(2027, 7, 15), 2)

Returns: 2024-01-15 (semiannual coupon before July 15)

Column Usage:


Bonds[PreviousCoupon] =
COUPPCD(
Bonds[SettlementDate],
Bonds[MaturityDate],
Bonds[Frequency]
)

Use in calculated columns to derive last payment date for each bond.

Advanced Usage

Calculate days since last coupon:


DaysSinceLastCoupon =
DATEDIFF(
COUPPCD([Settlement], [Maturity], [Frequency]),
[Settlement],
DAY
)

Tips and Tricks

  • Combine with COUPDAYBS to get accrued interest days.

  • Validate date inputs to avoid errors (settlement < maturity).

  • Inaccurate results if settlement is before first coupon date.

  • basis selection can subtly affect results, especially for edge cases.

Performance Impact of COUPPCD DAX Function:

  • Minimal performance impact; computed once per bond.

  • Safe to use on large datasets with column-based calculations.

Related Functions You Might Need

FunctionDescription
COUPNCDReturns the next coupon date after the settlement.
COUPNUMReturns the number of coupon periods between settlement and maturity.
COUPDAYSReturns number of days in the coupon period.
COUPDAYBSDays from previous coupon to settlement.
COUPDAYSNCDays from settlement to next coupon.

 

Want to Learn More?
For more information, check out the official Microsoft documentation for COUPPCD You can also experiment with this function in your Power BI reports to explore its capabilities.

Unlock the full capabilities of Power BI and elevate your data insights with our specialized consulting services. Whether you need guidance on advanced DAX functions like those highlighted here, support in designing interactive dashboards, or expertise in optimizing data models for enhanced performance, our experienced Power BI consultants are equipped to deliver customized solutions for your business. Explore our Power BI Consulting Services page to discover how we can help your organization make smarter, data-driven decisions.

1. What does COUPPCD return in Power BI?

It returns the last coupon payment date before the bond’s settlement date.

2. What are valid frequency values?

Allowed values are 1 (annual), 2 (semiannual), and 4 (quarterly).

3. Can COUPPCD be used without specifying a basis?

Yes. If omitted, it defaults to 0 (US 30/360 day count).

4. What happens if the settlement date is before any coupon date?

The function may return an error or unexpected result — ensure settlement is within bond term.

5. Is COUPPCD available in Excel?

Yes. It functions similarly in Excel and Power BI.