Reply
MiXiang
Frequent Visitor

Need help To fix the circular dependency

DF9E92EC-D1F4-4B16-888D-71E77E65F14A.png

ND

5488169B-122B-47A2-AB1A-FA7A95BE5BF0.png

FCADA372-023E-4AA1-9C26-FB49D2C349C2.png

C1AE0237-E841-423A-BE67-825AA9936D41.png

Can anyone help me to build the dax formula which can avoid the circular dependency? This is quite difficult because it include the recursion. But I think it can be solved because my answer are correct until the sixth month.

NP_B = Obtained the data from the Excel

ND_B = Obtained the data from the Excel

NS_B = Obtained the data from the Excel

NP = Previous ND+PreviousNS

ND = ND_B * (NP_R/NP_B-1)

NS = (NP_R*%)/3

NP_R = NP_B + NP

Can help me to build the dax formula for NP, ND, NS, NP_R to avoid circular dependency? Thanks a lot!!!

4 REPLIES 4
lbendlin
Super User
Super User

Are these measures or calculated columns?  Have you tried implementing this in Power Query instead?

I'm seeking assistance in creating a DAX formula within Power BI that can avoid circular dependencies. This challenge arises because my calculation involves recursion, but I'm optimistic that it can be resolved, as my results are accurate up to the sixth month.

Let's delve into the specifics:

1. Variables:
- NP_B: Data sourced from Excel.
- ND_B: Data sourced from Excel.
- NS_B: Data sourced from Excel.

2. Dependency Relationships:
- NP is dependent on the previous values of ND and NS.
- ND relies on ND_B, NP_B, and NP in its calculation.
- NS depends on NP_R and incorporates a percentage.

The crux of the issue lies in circular dependency:
- NP_R is utilized in both ND and NS calculations, creating a loop. This circular dependency is where I require guidance and a workaround solution tailored to Power BI.

In essence, I'm looking for a DAX formula that allows these interdependent variables to coexist without causing circular dependencies within Power BI.

Thanks a lot!!!

The formula for NP ND NS NP_R:

NP = Previous ND+PreviousNS

ND = ND_B * (NP_R/NP_B-1)

NS = (NP_R*)/3

NP_R = NP_B + NP

Please provide sample data (with sensitive information removed) that covers your issue or question completely, in a usable format (not as a screenshot). Leave out anything not related to the issue.
If you are unsure how to do that please refer to https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...
Please show the expected outcome based on the sample data you provided.

If you want to get answers faster please refer to https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...

No. I just use in calculated columns and measures

avatar user

Helpful resources

Announcements
March PBI video - carousel

Power BI Monthly Update - March 2025

Check out the March 2025 Power BI update to learn about new features.

March2025 Carousel

Fabric Community Update - March 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors (Last Month)
Top Kudoed Authors (Last Month)