Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

Circular dependency in calculated columns

I have a Months column.
I created measure "Max date = max(Months)"
I created column "Current value= if (Months = Max date measure, Balance, 0)"
I created measure "Min date = min(Months)"
I created column "Past value = if (Months =Min date measure, Balance, 0)

I'm getting a circular dependency error in Past value column.
Please help to resolve this
  • Hi Anonymous ,

     

    There is no need to create measures in that case. I would suggest you modify the DAX formulas for above calculated columns.

    Current value =
    IF ( Table[Months] = MAX ( Table[Months] ), 1, 0 )

    Past value =
    IF ( Table[Months] = MIN ( Table[Months] )10 )

     

    Best regards,

    Yuliana Gu

1 Reply

  • v-yulgu-msft's avatar
    v-yulgu-msft
    Microsoft Employee

    Hi Anonymous ,

     

    There is no need to create measures in that case. I would suggest you modify the DAX formulas for above calculated columns.

    Current value =
    IF ( Table[Months] = MAX ( Table[Months] ), 1, 0 )

    Past value =
    IF ( Table[Months] = MIN ( Table[Months] )10 )

     

    Best regards,

    Yuliana Gu