Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredJoin us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.
I need help on resolving circular dependency error on my formula:
Sales Level =
SWITCH(TRUE(),
'Sales'[Sales by Product]>=1000000,"Level1",
'Sales'[Sales by Product]<=999999 && 'Sales'[Sales by Product]>=500000,"Level2",
'Sales'[Sales by Product]<=499999 && 'Sales'[Sales by Product]>=100000,"Level3",
"Level4"
)
The formula for "Sales by Product" which was used in column above:
Sales by Product =
SUMX(
KEEPFILTERS(VALUES('Sales'[ProductID])),
CALCULATE(SUM('Sales'[Actual]))
)
Hoping for any assistance.
Solved! Go to Solution.
Hi @summer18 ,
Is Sales by Product a calculated column? If so try this instead:
Sales by Product =
CALCULATE (
SUM ( 'Sales'[Actual] ),
ALLEXCEPT( 'Sales'[ProductID] )
)
Have a read of
https://www.sqlbi.com/articles/avoiding-circular-dependency-errors-in-dax/
Which explains why you get circular dependency.
Hi,
I need help on resolving circular dependency error on my formula:
Below is the calculated column:
Hi @summer18
Please try this
Sales Level =
SWITCH(TRUE(),
'Sales'[Sales by Product]>=100000,"Level3",
'Sales'[Sales by Product]>=500000,"Level2",
'Sales'[Sales by Product]>=1000000,"Level1",
"Level4"
)
If not work, please share sample data or pbix file.
If solve your requirement, please mark this answer as SOLUTION
If this comment helps you, please LIKE this comment/Kudos
Proud to be a Super User! | |
Hi @PijushRoy , it did not work. I think I have to remove the circular dependency on ProductID but I don't know how.
Hi @summer18 ,
Is Sales by Product a calculated column? If so try this instead:
Sales by Product =
CALCULATE (
SUM ( 'Sales'[Actual] ),
ALLEXCEPT( 'Sales'[ProductID] )
)
Have a read of
https://www.sqlbi.com/articles/avoiding-circular-dependency-errors-in-dax/
Which explains why you get circular dependency.
Hi @summer18
Please paste some sample data
Proud to be a Super User! | |
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.