Forum Discussion
DAX NEW 'RATE' COLUMN
Good day Community, I hope you have a great year,
I have a table in Power BI that within its columns are 'quota', 'term', 'amount'.
I'm trying to create a new column to find out the interest rate using the RATE function, however it always throws me the following error: An argument from the 'RATE' function has the wrong data type or the result is too large or too small.
I have validated and all the rows have your data and in whole number format
I tested the formula on the first few rows and it works:
I think you may have some bad data somewhere in the table. Try using IFERROR to find it.
tasa = IFERROR ( RATE ( BASE_FINAL[plazo], - BASE_FINAL[cuota], - BASE_FINAL[monto] ), -1 )Filter the column to see which rows evaluate to -100%. These are the troublemakers.
3 Replies
- AlexisOlsonSuper User
In the documentation examples, the payment is negative and the loan amount is positive.
https://learn.microsoft.com/en-us/dax/rate-function-dax
Try swapping the sign of the columns like this:
RATE ( BASE_FINAL[plazo], - BASE_FINAL[cuota], - BASE_FINAL[monto] )- Syndicate_AdminAdministrator
When I put both negative values I still get the same error
- AlexisOlsonSuper User
I tested the formula on the first few rows and it works:
I think you may have some bad data somewhere in the table. Try using IFERROR to find it.
tasa = IFERROR ( RATE ( BASE_FINAL[plazo], - BASE_FINAL[cuota], - BASE_FINAL[monto] ), -1 )Filter the column to see which rows evaluate to -100%. These are the troublemakers.