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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
jennriches
Frequent Visitor

Help with circular references in measures

I am having trouble with a circular reference in my measures.

I believe my biggest issue is with a circular reference between the Opening and the Forecast figure.

 

I have included a OneDrive link to an excel sheet, this is what I am trying to achieve in Power Bi.  

 

Link to my excel table 

 

I have also created a pbix file with some dummy data, and the OneDrive link is below:

 

OneDrive file for PBIX dummy data 

 

I have simplified the measures I was trying to use as I think the main issue i have is the circular reference for the Opening measure as this is trying to use the forecast measure, but I can't think of a way around this as the forecast measure is based on the opening measure for the previous month.

 

These are my measures, it is the Opening measure that has the error:

 

Opening = IF( ISBLANK( [Opening Figure]), CALCULATE([Forecast Closing], DATEADD( 'Date'[Date], -1, MONTH)) , [Opening Figure])
Opening Figure = CALCULATE( SUM(Opening[Opening]))
New Business = CALCULATE ( SUM ( 'New Business'[New Business]))
Withdrawals = CALCULATE( [Opening Figure] * Withdrawals[Withdrawals Value]) * -1
Market Movement = CALCULATE( [Opening Figure] * 'Market Movement'[Market Movement Value])
Forecast Closing = [Opening] + [Market Movement] + [Withdrawals] + [New Business]

 

Thank you in advance for any help!

2 REPLIES 2
DoeJohn
Frequent Visitor

Hi @jennriches !

I am wondering if your problem has been solved?

Regards.

lbendlin
Super User
Super User

That's not your only problem.  Opening Figure also has a circular reference.

 

Do these have to be measures?  If you calculate these values in Power Query you can avoid the circular references.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors