Forum Discussion
Circular Dependency (Driving me Crazy)
Hi spaxia ,
You can use a calculated column to do it.
CALC =
CALCULATE (
FIRSTNONBLANK ( 'Table'[Value], 1 ),
FILTER ( 'Table', 'Table'[ID] = ( EARLIER ( 'Table'[ID] ) - 1 ) )
)
To avoid the Circular Dependency errors, you can refer to this document.
https://www.sqlbi.com/articles/avoiding-circular-dependency-errors-in-dax/
Best Regards,
Eads
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hello,
thank you so much for your help.
But actually I want something like:
CALC =
CALCULATE (
FIRSTNONBLANK ( 'Table'[CALC], 1 ),
FILTER ( 'Table', 'Table'[ID] = ( EARLIER ( 'Table'[ID] ) - 1 ) )
)
I would like essentially to calculate CALC based on the Previous CALC available.
Thank you so much
- v-eachen-msft7 years ago
Community Support
Hi spaxia ,
There is no recursive concept in DAX.
You have defined CALC with dax, but CALC in dax also needs to use this dax to define it, then it will fall into an endless loop.
You can refer to the document I attached in the previous answerBest Regards,
Eads
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.