Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
I am trying to generate a Balance, but I get a circular dependency.
The Initial Balance (the day the report is consulted will be Day 1) is the sum (Table1[Qty]). Then from second day on, it will be Final Balance
Sales, Sum Table2[Qty Sold] of the corresponding day
Final Balance, it will be Initial Balance - Sales.
Also, the visual is a matrix and it should be possible to get to see the values of Initial Balance, Sales and Final Balance per item.
What im looking for:
Dax:
SUM ( 'Table1'[Qty] )
)
SUM ( 'Table2'[Qty Sold] )
)
MAX(Dates[Date]) = TODAY(),
[Inventory],
CALCULATE([FinalBalance],PREVIOUSDAY(Dates[Date])
))
MAX(Dates[Date]) = TODAY(),
[Inventory] - [Sales],
[Initial Balance] - [Sales]
)
Tables: Table1, Table2 and a calendar table called Dates(columns= Year, Month, Day)
Table 1
| Client | Item | Qty | ID | Category |
| C01 | USB | 250 | C01_USB | Inventory |
| C01 | LAPTOP | 15 | C01_LAPTOP | Inventory |
| C01 | MOUSE | 35 | C01_MOUSE | Inventory |
Table 2
| Date | Item | Qty Sold | ID |
| Friday, 2/9 | USB | 120 | C01_USB |
| Friday, 2/9 | LAPTOP | 10 | C01_LAPTOP |
| Friday, 2/9 | MOUSE | 20 | C01_MOUSE |
| Saturday 2/10 | USB | 110 | C01_USB |
| Saturday 2/10 | LAPTOP | 0 | C01_LAPTOP |
| Saturday 2/10 | MOUSE | 5 | C01_MOUSE |
| Sunday 2/11 | USB | 20 | C01_USB |
| Sunday 2/11 | LAPTOP | 5 | C01_LAPTOP |
| Sunday 2/11 | MOUSE | 10 | C01_MOUSE |
are you sure this how the measures should work ?
i mean, measure A depends on B and measure B depends on A ?
im not sure if you need help detecting the dependency or you need help with the dax ;
but anw, i will point to the dependency ,
Is there a way around? or another way to deal with this?
thanks
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 38 | |
| 36 | |
| 33 | |
| 31 | |
| 28 |
| User | Count |
|---|---|
| 129 | |
| 88 | |
| 79 | |
| 68 | |
| 63 |