Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
Deermeat
Resolver I
Resolver I

An argument of function 'XXX' has the wrong data type or the result is too large or too small

Hello,

 

I'm trying to generate Accrued Interest for different bonds in PowerBI using calcuated column and the ACCRINT function. The current code I'm using is:

 

ACCINT =
ACCRINT (
    '10000 data'[Bond Issue Date],
    '10000 data'[First Interest Date],
    '10000 data'[Date],
    '10000 data'[Rate],
    1000,
    2
)

 

As the whole dataset is confidential, I am not able to post it online, however, here is a small sample of the dataset, it just consist of dates and coupon rates:

3.png

 

The code works when I limit the dataset to less than 10,000 rows:

4.png

 

But it starts to display this error when I try to fit it with 20,000 data.

image_2022_03_22T06_55_46_694Z.png

 

 

I

I tried this with a different financial function for cumulative interest and it has the same error:

1.png

 

From the error message and my experiment, I assume that it's because the dataset is too large. However, isnt the function done row by row? Why would it be an issue? Couldn't it just generate the accrued interest for each row, store it in the database and move on to the new row? Why would the result become too large?

 

Is there anyway to fix this or a work around for this issue?

 

Thank you very much for your help!

1 ACCEPTED SOLUTION
MFelix
Super User
Super User

Hi @Deermeat ,

 

Are you sure that the date fields are all correct meaning that you don't have any dates incorrect.

 

For this formula to work properly you need to have the issued date lower than the first interest and the settlement.

 

Add a simple column to chech if theses dates are all accordingly to what is expected something similar to:

 

'10000 data'[Bond Issue Date] <    '10000 data'[First Interest Date]

If you have falses in this statetment hten the calculation will not work properly because will give negative numbers. Check all the date columns logic.


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



View solution in original post

2 REPLIES 2
MFelix
Super User
Super User

Hi @Deermeat ,

 

Are you sure that the date fields are all correct meaning that you don't have any dates incorrect.

 

For this formula to work properly you need to have the issued date lower than the first interest and the settlement.

 

Add a simple column to chech if theses dates are all accordingly to what is expected something similar to:

 

'10000 data'[Bond Issue Date] <    '10000 data'[First Interest Date]

If you have falses in this statetment hten the calculation will not work properly because will give negative numbers. Check all the date columns logic.


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



Hi @MFelix,

 

Thank you for your help! Turns out one of the data point was empty and that caused the function to bug out!

 

Everything is working now!

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors