Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
Varshi288
Resolver II
Resolver II

Circular Dependency error

Hi,

 

Hi as I saw lot of post on circular dependency error but I am not able to figure out where circular dependency occurring from . I am attaching the calculated measures used.

selling price = MP(SP) and Transfer price = MP(TP).

 

MP (SP) = divide((Data_OMS[SP]),sum([BU list price]))

MP (TP) = divide((Data_OMS[TP]),sum([BU list price]))

 

TP = IF(HASONEVALUE('Report Currency'[Code]),SUMX(Data_OMS,'Data_OMS'[TP $]*[FX report]),SUMX(Data_OMS,Data_OMS[TP $]))

SP = IF(HASONEVALUE('Report Currency'[Code]),SUMX(Data_OMS,'Data_OMS'[SP $]*[FX report]),SUMX(Data_OMS,Data_OMS[SP $]))

 

I am creating two calculated column as MP (SP) range & MP (TP) range. How ever the formula is correct for MP(TP) range whereas for MP (SP) range im getting circular dependency error. If I create the same formula as a measure this looks fine and not showing any error.but I require this as column.

Can someone explain why is this happening pls and how to resolve.

 

 

Calculated Cloumn

 

MP (TP) range = SWITCH(

TRUE(),

[MP (TP)]>1,"1.00=>",

[MP (TP)]<=1.00 && [MP (TP)]>0.95,"0.95 - 1.00",

[MP (TP)]<=0.95 && [MP (TP)]>0.90,"0.90 - 0.95",

[MP (TP)]<=0.90 && [MP (TP)]>0.85,"0.85 - 0.90",

[MP (TP)]<=0.85 && [MP (TP)]>0.80,"0.80 - 0.85",

[MP (TP)]<=0.80 && [MP (TP)]>0.75,"0.75 - 0.80",

[MP (TP)]<=0.75 && [MP (TP)]>0.70,"0.70 - 0.75",

[MP (TP)]<=0.70 && [MP (TP)]>0.65,"0.65 - 0.70",

[MP (TP)]<=0.65 && [MP (TP)]>0.60,"0.60 - 0.65",

[MP (TP)]<=0.60 && [MP (TP)]>0.55,"0.55 - 0.60",

[MP (TP)]<=0.55 && [MP (TP)]>0.50,"0.50 - 0.55",

[MP (TP)]<=0.50 && [MP (TP)]>0.45,"0.45 - 0.50",

[MP (TP)]<=0.45 && [MP (TP)]>0.40,"0.40 - 0.45",

[MP (TP)]<=0.40 && [MP (TP)]>0.35,"0.35 - 0.40",

[MP (TP)]<=0.35 && [MP (TP)]>0.30,"0.30 - 0.35",

[MP (TP)]<=0.30 && [MP (TP)]>0.25,"0.25 - 0.30",

[MP (TP)]<=0.25 && [MP (TP)]>0.20,"0.20 - 0.25",

[MP (TP)]<=0.20 && [MP (TP)]>0.15,"0.15 - 0.20",

[MP (TP)]<=0.15 && [MP (TP)]>0.10,"0.10 - 0.15",

[MP (TP)]<=0.10 ,"< 0.10",

"NOT DEFINED")

 

 

 

Calculated Column.

MP (SP) range = SWITCH(

TRUE(),

[MP (SP)]>1,"1.00=>",

[MP (SP)]<=1.00 && [MP (SP)]>0.95,"0.95 - 1.00",

[MP (SP)]<=0.95 && [MP (SP)]>0.90,"0.90 - 0.95",

[MP (SP)]<=0.90 && [MP (SP)]>0.85,"0.85 - 0.90",

[MP (SP)]<=0.85 && [MP (SP)]>0.80,"0.80 - 0.85",

[MP (SP)]<=0.80 && [MP (SP)]>0.75,"0.75 - 0.80",

[MP (SP)]<=0.75 && [MP (SP)]>0.70,"0.70 - 0.75",

[MP (SP)]<=0.70 && [MP (SP)]>0.65,"0.65 - 0.70",

[MP (SP)]<=0.65 && [MP (SP)]>0.60,"0.60 - 0.65",

[MP (SP)]<=0.60 && [MP (SP)]>0.55,"0.55 - 0.60",

[MP (SP)]<=0.55 && [MP (SP)]>0.50,"0.50 - 0.55",

[MP (SP)]<=0.45 && [MP (SP)]>0.40,"0.40 - 0.45",

[MP (SP)]<=0.40 && [MP (SP)]>0.35,"0.35 - 0.40",

[MP (SP)]<=0.35 && [MP (SP)]>0.30,"0.30 - 0.35",

[MP (SP)]<=0.30 && [MP (SP)]>0.25,"0.25 - 0.30",

[MP (SP)]<=0.25 && [MP (SP)]>0.20,"0.20 - 0.25",

[MP (SP)]<=0.20 && [MP (SP)]>0.15,"0.15 - 0.20",

[MP (SP)]<=0.15 && [MP (SP)]>0.10,"0.10 - 0.15",

[MP (SP)]<=0.10 ,"< 0.10",

"NOT DEFINED")

 

Error message

A circular dependency was detected: Data_OMS[MP (SP) range], Data_OMS[MP (TP) range], Data_OMS[MP (SP) range].

 

 

1 REPLY 1
Mariusz
Community Champion
Community Champion

Hi @Varshi288 

The below article from @AlbertoFerrari , will explain your problems with circular dependencies.

https://www.sqlbi.com/articles/avoiding-circular-dependency-errors-in-dax/

 

Regards,
Mariusz

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

 

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Top Solution Authors