Forum Discussion

eddya's avatar
eddya
Frequent Visitor
7 years ago
Solved

Circular Dependency Similar Columns

Hello,

 

After finally figuring out how to count working hours between 2 dates, I have finally found a solution using this formula:

 

OrderDate to VerifiedDate (Hours) = DATEDIFF([OrderDate],[ShippedVerifiedByDate], HOUR) -
(
   CALCULATE (
        COUNTROWS('Report'),
        'Report'[isWorkday] = TRUE( ),
        DATESBETWEEN('Date.Table'[Date], Report[OrderDate],Report[ShippedVerifiedByDate])
   )*24)

This formula is working as expected. I would like to also measure the time between the ShipVerified Date and the actual Ship Date. I am attempting to use this formula:

 

VerifiedDate to ShipDate (Hours) = DATEDIFF([ShippedVerifiedByDate],[ShipDate], HOUR) -
(
   CALCULATE (
        COUNTROWS('Report'),
        'Report'[isWorkday] = TRUE( ),
        DATESBETWEEN('Date.Table'[Date], Report[ShippedVerifiedByDate],Report[ShipDate])
   )*24)

I am receiving the following error as a result:

 

 

A circular dependency was detected: Report[VerifiedDate to ShipDate (Hours)], Report[OrderDate to VerifiedDate (Hours)], Report[VerifiedDate to ShipDate (Hours)].

Any assistance is appreciated.

 

Thank you!