Forum Discussion
AUaero
Responsive Resident
4 years agoCalculated table generates a circular dependency when joined
Hi, I've built a calculated table to rank salespeople based on several metrics over the last 365 days. Here's the code: Magnolia Club ISR =
VAR tblData =
CALCULATETABLE(
ADDCOLUMNS(
SELEC...
- 4 years ago
Update 2 - the fix was easy enough, even if figuring out the problem with circular dependency isn't always evident. By eliminating the blank row on the Customer table I was able to successfully build the realtionship in my data model. My new measure is:
# Buying PRONTO Customers = SUMX( ALLNOBLANKROW(Customer), SWITCH( TRUE(), Customer[# E1 Buying PRONTO Customers] > 0, 1, Customer[# CMA Buying PRONTO Customers] > 0, 1 ) )
Anonymous
4 years agoNot applicable
Hi AUaero ,
You can try restrict the list of columns that the calculated column depends on, by using ALLEXCEPT or REMOVEFILTERS and keeping only the table’s primary key. If the table has no primary key, then using CALCULATE in a calculated column is dangerous.
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.