Circular Dependency error while trying to calculate funding based on Closing Balance+Movement

Hope I am making sense now!

Hi,

I attached the pbix
pls check it
check 3.pbix (241.4 KB)

check 3 (3).pbix (241.8 KB)
image
(I just altered the data to check) ,for Sep 2020, the Closing Balance is negative (04+0-1.2)=-0.7M
But Funding is 0 which should not be the case.
Funding should be 0.7M
Closing Balance Updated should be 0 for Sep 2020

Got to know that it is recursion type of logic, no idea how to implement

Hi,
can you share the desired output

becuze i think the below one is lacking some thing

  1. or this is the correct one

  2. or this one is correct


Two sample outputs expected.

Please be sure to check out our DAX Clean Up tool it’s a great way to ensure to make your DAX code easy to read. Thanks!

https://analysthub.enterprisedna.co/dax-clean-up

Hi ,
Have a look at below screen shot and let me know is it what you want.

Could you please share me the pbix? So I can test different conditions?

check 3 (3).pbix (243.0 KB)


We need to determine the funding based on opening balance also.
In the highlighted case, there is an opening balance of 385.9M.
Movement for the same month(May ) is -4.4M
Funding has to be determined on 385.9M-4.4M, which is positive, so no funding required in May 2021

Your new input causes circular condition now [closing balance updated] depend on [funding] and now funding depend on [opening Balance] and [opening Balance ] depend on [closing balance updated] .
Need to figure out how to avoid that circular loop.

Yea , that is the issue ! :slight_smile:

@Anurag Any luck with this?

This time i also need help not able to think how remove that circular dependency do you any idea let me know so we can work on that .

check 3 _Greg.pbix (241.1 KB)

This is an example proposed by Greg Deckler, but we need to modify it to suit our requirement ,its not complete,

He said creating new columns for every month , to hold the updated cumulative balance is the only way to solve it.

Can you tell me more what the main idea behind that approach.

The updated closing balance with funding should be available for the next month’s funding determination.
So creating new tables to store that updated closing balance every month.
Thats what I understood!

check 3 _Greg_1_10.pbix (191.1 KB)
This is working, but the performance is really bad, when implemented in real scenario. Please let know if there is a better way out for this.

Thanks to the contributors to this post. Due to the length by which this post has been active, we are tagging it as Solved. For further questions related to this post and more visibility please start a new topic within the forum. You may check this how-to guide for reference - How To Use The Enterprise DNA Support Forum https://forum.enterprisedna.co/t/how-to-use-the-enterprise-dna-support-forum/3951