Forum Discussion

kmax's avatar
kmax
Helper I
2 years ago
Solved

Circular dependency error

Hello,  I am facing a strange issue when creating a report. Here are the details.   There are two main slicers. 1- Year 2- LoB Here are four main measures. 1- OB Initial = this is the openi...
  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi,kmax 

    Regarding the issue you raised, my solution is as follows:

    1.Based on the pbix file you provided, we infer that the reason you have a circular dependency problem is because you referenced [Ending CARR Measure] in your [OB Adjusted] measure, However, [OB Adjusted] is cited in [Ending CARR Measure], resulting in cyclic dependence.

    Solved: Recursion in DAX - Microsoft Fabric Community

     

    2.You can try doing the calculation in excel first and then importing it into power bi. This is by far the easiest way.

    Here are links to the relevant documents:

    How to create recursive functions in Excel with LAMBDA (spreadsheetweb.com)

     

    3.You can also implement this functionality in powerquery, but you need to put a little more effort into it:

    Here are links to the relevant documents:

    Recursive Functions in Power Query | Power BI Data (enterprisedna.co)

     

    Best Regards,

    Leroy Lu

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