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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
vaz19
New Member

Circular Dependency error

Hi all,

I'd like to create two new columns, but I get an error "circular dependency was detected: DailyEntry[Intensity (%)], DailyEntry[Volume (%)], DailyEntry[Intensity (%)]"

 

The first column I want it to be:

 

Volume (%) =
VAR TD = [TD_Game%]
VAR sprint = [Sprint Distance_Game%]
VAR HSR = [HSR_Game%]
VAR acceldecel = [SUM A:D_Game%]
VAR result =
(TD + sprint + HSR + acceldecel)/4
RETURN result
 
and the second one:
 
Intensity (%) =
VAR td = [Distance/min_Game%]
VAR HSR = [HSR/min_Game%]
VAR SD = [Sprint Distance/min_Game%]
VAR acceldecel = [SUM A:D/min_Game%]
VAR result =
(td + HSR + SD + acceldecel)/4
RETURN result

I cannot understand where the dependency is, since the variables are different.
 
Could you please help me?
 
Thank you,
 
Apostolos
1 ACCEPTED SOLUTION
v-yingjl
Community Support
Community Support

Hi @vaz19 ,

If there is only one data table in the report, you need to set a key column for the table and then use removefilters() in the two calculated columns:

vyingjl_0-1632208473882.png

Column = 
VAR TD = [TD_Game%]
VAR RESULT = TD / 4
RETURN
    CALCULATE ( RESULT, REMOVEFILTERS ( 'Table'[Column 2] ) )

Column 2 = 
VAR td = [TD_Game%]
VAR result = td / 4
RETURN
    CALCULATE ( result, REMOVEFILTERS ( 'Table'[Column] ) )

vyingjl_1-1632208539060.png

 

Please refer this blog: Avoiding-circular-dependency-errors-in-dax 

 

Best Regards,
Community Support Team _ Yingjie Li
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-yingjl
Community Support
Community Support

Hi @vaz19 ,

If there is only one data table in the report, you need to set a key column for the table and then use removefilters() in the two calculated columns:

vyingjl_0-1632208473882.png

Column = 
VAR TD = [TD_Game%]
VAR RESULT = TD / 4
RETURN
    CALCULATE ( RESULT, REMOVEFILTERS ( 'Table'[Column 2] ) )

Column 2 = 
VAR td = [TD_Game%]
VAR result = td / 4
RETURN
    CALCULATE ( result, REMOVEFILTERS ( 'Table'[Column] ) )

vyingjl_1-1632208539060.png

 

Please refer this blog: Avoiding-circular-dependency-errors-in-dax 

 

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

 

HotChilli
Super User
Super User

The main problem I think is that these look like columns based on measures.  Is that right? e.g. [Sprint Distance_Game%]

If so, you need to rewrite the columns to not use measures.

mh2587
Super User
Super User

It is based on your model how you make the relations 


Did I answer your question? If so, please mark my post as a solution!


Proud to be a Super User!




LinkedIn Icon
Muhammad Hasnain



Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors