Forum Discussion
Delta Values from Previous Day Using Multiple Columns
- Anonymous9 years ago
So... I can't see why there would be a ciruclar dependency error, but my expression isn't QUITE correct either, please update, and maybe do a "plz work, plz work, plz work" dance :)
VOLUME_DELTA =
VAR Yesterday = MyTable[StartTime] - 1
VAR MyMaterial = MyTable[Material Number]
VAR MyElement = MyTable[Element]
RETURN
MyTable[Volume] -CALCULATE(VALUES(MyTable[Volume]),
FILTER(ALL(MyTable),
MyTable[StartTime] = Yesterday &&MyTable[Material Number] = MyMaterial &&
MyTable[Element] = MyElement
))
Man, I am just CURSED by circular references lately. Do you have OTHER calculated columns in the table? Do you need them? :)
Read here about the interaction between multiple calc columns:
https://www.sqlbi.com/articles/understanding-circular-dependencies/
The other calculated columns that were added have now been removed and the circular dependency is still registering as the error.
I appreciate your help.
Chris
- Anonymous9 years agoNot applicable
So... I can't see why there would be a ciruclar dependency error, but my expression isn't QUITE correct either, please update, and maybe do a "plz work, plz work, plz work" dance :)
VOLUME_DELTA =
VAR Yesterday = MyTable[StartTime] - 1
VAR MyMaterial = MyTable[Material Number]
VAR MyElement = MyTable[Element]
RETURN
MyTable[Volume] -CALCULATE(VALUES(MyTable[Volume]),
FILTER(ALL(MyTable),
MyTable[StartTime] = Yesterday &&MyTable[Material Number] = MyMaterial &&
MyTable[Element] = MyElement
))
- Chris_McD9 years agoRegular Visitor
This newer version worked.
My dance came after.
Thanks for the help.
Chris