Daily DAX : Day 279 PMT
The **PMT** function in Power BI's DAX (Data Analysis Expressions) language calculates the payment amount for a loan or investment based on a constant interest rate, a fixed number of payments, and a present value. It’s commonly used in financial models to determine periodic payments for loans, mortgages, or annuities.
### Syntax
```
PMT(rate, nper, pv, [fv], [type])
```
### Parameters
- **rate**: The interest rate per period (e.g., annual rate divided by 12 for monthly payments).
- **nper**: The total number of payment periods (e.g., 360 for a 30-year loan with monthly payments).
- **pv**: The present value, or the initial loan amount (e.g., the loan principal).
- **[fv]** (optional): The future value, or the balance after the last payment (default is 0, meaning the loan is fully paid off).
- **[type]** (optional): Specifies when payments are due. Use 0 (end of the period, default) or 1 (beginning of the period).
### Return Value
The function returns the periodic payment amount as a negative number (representing cash outflow for the borrower).
### Use Case
The PMT function is useful in financial analysis for:
- Calculating monthly mortgage or loan payments.
- Determining annuity payments for investments or retirement plans.
- Building financial models to assess affordability or cash flow requirements.
### Example
Suppose you have a $200,000 mortgage with a 5% annual interest rate, paid monthly over 30 years.
#### DAX Formula
```
MonthlyPayment = PMT(0.05 / 12, 30 * 12, 200000, 0, 0)
```
- **rate**: 0.05 / 12 = 0.004167 (monthly interest rate).
- **nper**: 30 * 12 = 360 (total monthly payments).
- **pv**: 200000 (loan amount).
- **fv**: 0 (loan fully paid off).
- **type**: 0 (payments at the end of each period).
#### Result
The formula returns approximately **-1,074.65**, meaning the monthly payment is $1,074.65.
### Practical Application in Power BI
1. **Data Model**: Create a table with loan details (e.g., loan amount, interest rate, term).
2. **Calculated Column or Measure**: Use the PMT function to compute the payment amount for each loan.
- Example Measure:
```
LoanPayment = PMT( [InterestRate] / 12, [TermInYears] * 12, [LoanAmount], 0, 0 )
```
3. **Visualization**: Display the payment amounts in tables, charts, or dashboards to analyze loan affordability or compare different loan scenarios.
### Notes
- Ensure the **rate** and **nper** units align (e.g., monthly rate for monthly payments).
- The result is negative, reflecting a cash outflow. Use `ABS()` if you need a positive value for display.
- If **fv** or **type** are omitted, they default to 0.
- For dynamic inputs, use Power BI parameters or slicers to allow users to adjust loan terms interactively.
This function is powerful for financial reporting and decision-making in Power BI dashboards, especially for scenarios involving loans or structured payments.
Comments
Post a Comment