Forum Discussion

AUaero's avatar
AUaero
Icon for Responsive Resident rankResponsive Resident
4 years ago
Solved

Calculated 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...
  • AUaero's avatar
    AUaero
    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
        )
    )