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.
Thank you Eads,
actually this is not what i want to achieve. Let me explain with more details:
I have the following scenario:
WAC it's what I want to achieve (i created the result manually) , but i cannot find a way to add such a calculted column. it should be a column since a need to reuse it in other calculations so cannot be a measure.
To give an example to calculate WAC or row 2 i do the following
(Amount + (Stock * (CALC of previous Row))) / Stock + Qty
(40 + (5 * 9)) / 5 + 5
Result would be 85/10 = 8,5
And so on...
Thank you so much for your help