Forum Discussion

ZodtePt's avatar
ZodtePt
New Member
3 years ago
Solved

Calculating a factor

Hi, I'm trying to calculate the column "Fator" and the calculous is pretty simple. I just want to do this math operation: FATOR = "Previous Factor" * ("Taxa CDI Deslocada"+1)^(("Dias úteis...
  • Anonymous's avatar
    Anonymous
    3 years ago

    Hi  ZodtePt ,

     

    Depending on your requirements description, you want to implement logic that implements loop iteration multiplication by referencing the value of the "factor" on the previous line, right? The logic of the first line should be derived like this, right?

     

    100*(0.1365+1)^((42-0)/252)-1

     

    If this is the case, DAX can not implement the loop iteration multiplication logic you want to get, I recommend that you use the For loop in Python to implement this logic, convenient and efficient, and then use Python to implement this logic, you can in turn try to use PBI desktop's Python data source connector to connect to this processed data, and continue to create the corresponding visual according to your needs:

    Python For Loops (w3schools.com)

    Run Python Scripts in Power BI Desktop - Power BI | Microsoft Learn

     

    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.