Forum Discussion

Gutts_Zero's avatar
Gutts_Zero
Frequent Visitor
3 years ago
Solved

ipmt and ppmt calculation has wrong data type or the result is too large/small

Was following a youtube video on PPMT and IPMT functions but encountered this error and don't know how to fix it.   Link to file 
  • Anonymous's avatar
    Anonymous
    3 years ago

    Hi  Gutts_Zero ,

     

    According to your description, here are my steps you can follow as a solution.

    (1) We can create measures.

    Measure = var _a=CALCULATE(MAX('Fact'[Period]),FILTER(ALL('Fact'),'Fact'[Period]=MAX('Fact'[Period]))) return IF([Is within Period]=0,1,_a)
    ipmt = ipmt(0.06/12,[Measure],'Loan Period'[Loan Period Value]*12,200000,0,0)

    (2) Then the result is as follows.

     

     

    Best Regards,

    Neeko Tang

    If this post  helps, then please consider Accept it as the solution  to help the other members find it more quickly.