Forum Discussion

Hemanth1717's avatar
Hemanth1717
New Member
4 years ago

A circular dependency was detected

Hello All,

 

Trying to create a calculated column for tracking Previous Month disbursal data and comparing it with current month employee wise but getting circular dependency error. 

 

Here is column i tried to create

Previous Month Disbursement =
var a= CALCULATE(SUM('Sales Disbursement'[todaysdisbamount]), MONTH('Sales Disbursement'[first_disbursal_date])=MONTH(TODAY())-1)
return
IF(ISBLANK(a),0,a)
Can anyone please suggest me better way to handle this scenario.
 
 
 
 

4 Replies

  • Hi Hemanth1717 ,

     

    Rather than creating a calculated column, I would suggest creating a measure for your above calculation.

    This will avoid any circular dependency errors.

     

    Thanks,

    Pragati

  • Hi Pragati, Need it for grouping employess based on Calculated column. Need to project values like below

     

    Movement
    UP
    SAME
    DOWN
    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi Hemanth1717 ,

      I just tried to reproduce your problem: create a table Sales Disbursement with field first_disbursal_date and todaysdisbamount and create a calculated column using your formula, it works well... I'm not sure whether I missing something here. Could you please provide some sample data (exclude sensitive data) in your table Sales Disbursement?

      In addition, you can review the content in the following blogs to understand and avoid circular dependency error.

      Understanding circular dependencies in DAX

      Avoiding circular dependency errors in DAX

      Best Regards

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Hemanth1717 ,

    Whether your problem has been resolved? If yes, could you please mark the helpful post as Answered? It will help the others in the community find the solution easily if they face the same problem with you. Thank you.

    Best Regards