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

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!

Reply
Berl21
Helper III
Helper III

Circular dependency calculated table

Hi,

 

I created a calculated table with the following command:

 

Leads Amount PY =
CALCULATETABLE(
SUMMARIZE(
    Leads_Table,
     Leads_Table[ZH_Account__c],
     Leads_Table[Lead_Creation_Date],
    "Count of Leads PY",
    [Count Leads]
),
YEAR ( Datetable[Date]) = YEAR ( TODAY () ) -1
)

 

When I try to add it in the model, I get the following mistake:

 

Berl21_0-1666610288885.png

I am connecting Lead_Creation_Date to the column "Date" in my calendar table. There are no other link between the two tables. What are the typical scenarios I should double check?

 

Thanks,

 

Pauline.

1 ACCEPTED SOLUTION
v-yalanwu-msft
Community Support
Community Support

Hi, @Berl21 ;

You could add a dax ALLNOBLANKROW() such as :

Leads Amount PY =
CALCULATETABLE (
    SUMMARIZE (
        ALLNOBLANKROW ( Leads_Table ),
        Leads_Table[ZH_Account__c],
        Leads_Table[Lead_Creation_Date],
        "Count of Leads PY", [Count Leads]
    ),
    YEAR ( Datetable[Date] )
        = YEAR ( TODAY () ) - 1
)

You could refer this video.

Avoiding circular dependency errors in DAX - YouTube
Best Regards,
Community Support Team _ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
v-yalanwu-msft
Community Support
Community Support

Hi, @Berl21 ;

Is your problem solved?  If so, kindly mark the proper reply as a solution to help others having the similar issue and close the case. If not, let me know and I'll try to help you further.


Best Regards,
Community Support Team _ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

v-yalanwu-msft
Community Support
Community Support

Hi, @Berl21 ;

You could add a dax ALLNOBLANKROW() such as :

Leads Amount PY =
CALCULATETABLE (
    SUMMARIZE (
        ALLNOBLANKROW ( Leads_Table ),
        Leads_Table[ZH_Account__c],
        Leads_Table[Lead_Creation_Date],
        "Count of Leads PY", [Count Leads]
    ),
    YEAR ( Datetable[Date] )
        = YEAR ( TODAY () ) - 1
)

You could refer this video.

Avoiding circular dependency errors in DAX - YouTube
Best Regards,
Community Support Team _ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

DataInsights
Super User
Super User

@Berl21,

 

Here are two ideas:

 

1. Move the calculated table to Power Query.

2. Modify the DAX as follows:

 

Leads Amount PY =
CALCULATETABLE (
    SUMMARIZE (
        Leads_Table,
        Leads_Table[ZH_Account__c],
        Leads_Table[Lead_Creation_Date],
        "Count of Leads PY", [Count Leads]
    ),
    FILTER ( ALLNOBLANKROW ( Datetable[Date] ), YEAR ( Datetable[Date] ) )
        = YEAR ( TODAY () ) - 1
)

 

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





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

Vote for your favorite vizzies from the Power BI World Championship submissions!

Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.