Forum Discussion
dmbd1904
Helper III
4 years agoCircular Dependency
Hi I'm really struggling with this one. Can any one help Standing Time = VAR Location = COR_DepthRelatedExploratoryInformation[LocationDetails] VAR Startdate = COR_DepthRelatedExplo...
v-chenwuz-msft
Community Support
4 years agoHi dmbd1904 ,
This is Circular Dependency error in DAX.
You should add allexcept() to CALCULATE() function.
You can try the following code:
Standing Time =
VAR Location = COR_DepthRelatedExploratoryInformation[LocationDetails]
VAR Startdate = COR_DepthRelatedExploratoryInformation[DateTimeStart]
VAR Enddate = COR_DepthRelatedExploratoryInformation[DateTimeEnd]
RETURN
CALCULATE(
SUM( COR_TimeRelatedRemarksLocation[Working Hour Duration] ),
ALLEXCEPT( COR_TimeRelatedRemarksLocation, [primary key column] ),
COR_ProgressByTime[LocationDetails] = Location,
COR_TimeRelatedRemarksLocation[DateTimeStart] >= Startdate,
COR_TimeRelatedRemarksLocation[DateTimeEnd] <= Enddate
)
For more detail of Circular Dependency error in DAX, please refer this article.
https://www.sqlbi.com/articles/understanding-circular-dependencies/
Best Regards
Community Support Team _ chenwu zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.