Forum Discussion

0XMaijeh's avatar
0XMaijeh
Frequent Visitor
3 years ago

HELP WITH CIRCULAR DEPENCENCY ISSUES

I want to create a measure called Products Available => It is derived from [Product Opening Balance] and just gives me the closing balance for the previous month as the opening balance of the new month. That is why I have this measure; Product Opening Balance = VAR PreviousClosingBalance =
CALCULATE([Product Closing Balance], DATEADD('Calendar'[Date], -1, MONTH))
RETURN
IF(PreviousClosingBalance < 0, BLANK(), PreviousClosingBalance)

I now want to add [Product Opening Balance] to two other measures to make create the [Products Available] measure => ([Company SKUs] and [Monthly Forecasted Returns).

Recall I said [Product Opening Balance] is determined by [Product Closing Balance]. The DAX for Product Closing Balance = [Product Opening Balance] - [Product Demand]. When I add [Product Opening Balance] + [Company SKUs] + [Monthly Forecasted Returns] to get Products Available, I run into a circular dependency issue.

Which I think is caused by [Product Opening Balance] being determined by [Product Closing Balance]. Please What do I need to do to avoid this, kindly recommend the most efficient DAX code to solve this problem.

3 Replies