Reputation: 11
I am trying to create a logic in PowerBI to use T-1 closing balance as my T opening balance. But I'm getting "Circular dependency" error. Table looks like:
Date Opening CurrentDay Closing
Jan 1 0 100 100
Jan 2 100 -200 -100
Jan 3 -100 200 100
Jan 4 100 -100 0
Jan 5 0 300 300
Date and CurrentDay balance is in my data table; Opening/closing are calculated columns or measures. Opening = previous closing; Closing = opening+currentday.
Any suggestion?
Much appreciated!
Upvotes: 1
Views: 257
Reputation: 40224
You can't write recursive formulas in DAX.
The way you would do this is to write Opening
and Closing
as running totals of CurrentDay
where Opening
is the total up to the current day and Closing
is the total including the current day.
Upvotes: 1