Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
William_Moreno
Helper II
Helper II

Create opening and closing stock in the data columns (trouble with circular dependecy)

Hi guys, again I need help!

 

My problem today is about circular dependecy.
I tried to build a data table for opening e closing stock, but I've had faced problems to finish it.

I need to do it with columns data, at this point I didn't want to use measures. Is it possible?

 

Table

 

LocalCodeUMDataOpeningStockSalesOrderNecessityClosingStockGoal
ItalyPACKGINGUN01/03/2021230.200791.907504.000891.601833.895833.895
ItalyPACKGINGUN01/04/2021833.895860.442756.000104.442833.895833.895
ItalyPACKGINGUN01/05/2021833.895926.2481.008.0000915.646833.895
ItalyPACKGINGUN01/06/2021915.646988.9200907.168833.895833.895

 

The column Necessity has this formula: 
IF(Goal - (OpenningStock + Order - Sales)<0;0;Goal - (OpenningStock + Order - Sales))

The column ClosingStock has this formula: 

OpeningStock + Order + Necessity - Sales

 

Someone could help me?

Thanks a lot.

William M.

 

1 ACCEPTED SOLUTION
PhilipTreacy
Super User
Super User

Hi @William_Moreno 

 

Download sample PBIX fle

 

I'm not getting a circular dependency error with those column calculations.  You are?  If so please show screenshots and more details.

Here are my columns

Necessity = IF([Goal] - ([OpeningStock] + [Order] - [Sales])<0, 0 , [Goal] - ([OpeningStock] + [Order] - [Sales]))
ClosingStock = [OpeningStock] + [Order] + [Necessity] - [Sales]

circ.png

Regards

Phil



Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


Blog :: YouTube Channel :: Connect on Linkedin


Proud to be a Super User!


View solution in original post

2 REPLIES 2
PhilipTreacy
Super User
Super User

Hi @William_Moreno 

 

Download sample PBIX fle

 

I'm not getting a circular dependency error with those column calculations.  You are?  If so please show screenshots and more details.

Here are my columns

Necessity = IF([Goal] - ([OpeningStock] + [Order] - [Sales])<0, 0 , [Goal] - ([OpeningStock] + [Order] - [Sales]))
ClosingStock = [OpeningStock] + [Order] + [Necessity] - [Sales]

circ.png

Regards

Phil



Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


Blog :: YouTube Channel :: Connect on Linkedin


Proud to be a Super User!


Hi Phillip, thanks for answer me. I've forgot to say that the column OpeningStock has to be calculated by this logical formula is the CloseStock of the last month. Thanks again.

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.