Forum Discussion

datacauts's avatar
datacauts
Icon for Helper I rankHelper I
4 years ago

IRR with dynamic measures

Pbix file: https://ufile.io/8lsvjz9t

 

Hi guys! Could you help me out with one Internal Rate of Return (IRR) question, please? The funcionality that I'm seeking is the following one: I have three assets on my financial data and, when I select their ticker, the box "IRR" should show the correspondent IRR value (in %) for the specific ticker selected. For the IRR function to work, I need to have Cash Flow values for the years to come. My problem comes mainly due to the facts that 1) each year of Future Cash Flow has a specific form of calculation (therefore I created mesures for each future year), and 2) certains elements involve webscraping updating, so both facts give me the problem that I have variables that are changeable and will continuously keep changing. Ideally, from my point of view, it could be solved if it would be possible to generate a table containing columns with 1) the different assets, 2) future dates (years) and 3) corresponding cash flows for each asset and year. Obs: inside the folder "_IRR", I left also an unsuccesful trial of doing the TIR calculations entirely on DAX ("IRR test", in case anyone knows how to solve it), but since it is quite difficult to isolate the IRR variable within the IRR conventional formula, Power BI wasn't able to understand the logic.

5 Replies

  • PijushRoy's avatar
    PijushRoy
    Icon for Community Champion rankCommunity Champion

    Hi datacauts 

    Please share sample data and expected result data. If you ok, please share PBIX file

    • datacauts's avatar
      datacauts
      Icon for Helper I rankHelper I

      Basically, if I could get a calculated table with "Financial Data[Asset]" on one column, then "Years" values (going from 2022 to 2028 / or an INDEX going from 1 to 7) for every asset: like this:

      ASSET1 - 2022
      ASSET1 - 2023
      ASSET1 - 2024
      ...
      ASSET1 - 2028
      ASSET2 - 2022
      ...

       

      Then I think I would just need to create a formula which says "for 2022 rows, assign the [CF 2022] for that Asset" and "for 2023 rows, assign the [CF 2023] for that Asset", and so on. After that I would have three columns: Asset, Year and Cash Flow by Year and then I think I could just use the XIRR formula perhaps. What do you think?