Forum Discussion

Gurpreetsingh1's avatar
5 months ago
Solved

Recursive loop Measure /Auto Adjustable Measure /Circular Dependency Issue While Adjusting values

Hi all, I’m working on a P&L matrix in Power BI where I have: Base values (BU P&L + Manual Adjustments) Intercompany (IC) values A calculated difference between IC and BU P&L What I’m ...
  • lbendlin's avatar
    5 months ago

    DAX does not support recursions. You need to reformulate your logic so it works without these.

     

    Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
    Do not include sensitive information. Do not include anything that is unrelated to the issue or question.
    Please show the expected outcome based on the sample data you provided.

    Need help uploading data? https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216
    Want faster answers? https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523

  • grazitti_sapna's avatar
    5 months ago

    Hi Gurpreetsingh1,

     

    You are correct, looping is not possible in Power BI.

     

    You cannot push a calculated difference back into IC in DAX due to circular dependency. Instead, solve algebraically (IC = BU), use proportional allocation, or add a plug/adjustment line to eliminate the difference.

     

    Your logic below is creating circular dependency

    Difference = IC – BU
    IC (Adjusted) = IC – Difference

     

    You recreate your Excel logic in Power BI by using a plug/adjustment measure (IC Adjustment) instead of feeding difference back into IC, eliminating circular dependency.

     

    I've created a sample .pbix file for you, kindly take a look.

     

    🌟 I hope this solution helps you unlock your Power BI potential! If you found it helpful, click 'Mark as Solution' to guide others toward the answers they need.
    💡 Love the effort? Drop the kudos! Your appreciation fuels community spirit and innovation.
    🎖 As a proud SuperUser and Microsoft Partner, we’re here to empower your data journey and the Power BI Community at large.
    🔗 Curious to explore more? [Discover here].
    Let’s keep building smarter solutions together!