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!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
Hi, good morning. Hope you're ok.
I have an issue projecting a variable.
I have a star model in which I have information about inventory, sales and purchases. And I have an initial real value.
For example. Initial inventory for june is 100, I have sales by 60 and purchases for 30, which means at the end of june I will have 70 units. This 70 units must be the july initial inventory and so on to the future.
I have already calculated some metrics but I got a circular error which I cannot solve.
This is my initial formula per month
and my close stock per month
Clearly there's a circular reference, because end of month stock use initial inventory and, for the past I have to display the real of the next month, not the natural close of the metrics. But I don't how to filter, that from one date takes the real and for the rest take the calculated metric and create the reference circular.
I'm attaching also the model if helps.
Hope you can help me. It's been 5 days since solutions and I have tried all recommendations from internet.
Link model: https://drive.google.com/file/d/149mHMmlyS80B4fVlBxFaXUcpDSaiACeR/view?usp=sharing
I remember that such problems have already been soleved on this forum. I have addressed several issues like this in the past myself. I'll try to look into your file but can't guarantee it'll be today.
I'm just thinking... Would it not be OK to pre-calculate the inventory state at the beginning/end of each month and place the values into a table instead of writing a measure for this? You could do it in the source system or Power Query where it would be rather easy. Have you thought about it?
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.