Showing results for 
Search instead for 
Did you mean: 
Helper I
Helper I

Self-referencing column

Not sure if my title is accurate, but I wasn't sure how to phrase what I need. 


Below is a sample table of data. I want to fill in the [Monthly Position] column using a forumla that would be simple in Excel, but is difficult here given my lack of m/DAX programming knowledge.




The formula would be: (previous month's Position) + (current month's Billing) - (current month's Collections)


The correct results should look like this:




I feel like the answer is easy but I'm just missing it for some reason. Any help is much appreciated!!!

Super User
Super User

Hi @sethwallin 

Please always show your sample data in text-tabular format in addition to (or instead of) the screen captures. A screen cap doesn't allow people to readily copy the data and run a quick test and thus decreases the likelihood of your question being answered. Just use 'Copy table' in Power BI and paste it here. Or, ideally, share the pbix (beware of confidential data).


You cannot reference a column in its own code. It's a circular dependency. Looking at how your column is built, I believe this would work:

Monthly Position =
    SUM ( Table1[Billing] ) - SUM ( Table1[Collection] ),
    Table1[Date] <= EARLIER ( Table1[Date] )



Please mark the question solved when done and consider giving kudos if posts are helpful.

Cheers  Datanaut

Helpful resources

May 23 2022 epsiode 5 without aka link.jpg

The Power BI Community Show

Welcome to the Power BI Community Show! Jeroen ter Heerdt talks about the importance of Data Modeling.

charticulator_carousel_with_text (1).png

Charticulator Design Challenge

Put your data visualization and design skills to the test! This exciting challenge is happening now through May 31st!

Power BI Dev Camp Session 22 with aka link 768x460.jpg

Check it out!

Mark your calendars and join us on Thursday, May 26 at 11a PDT for a great session with Ted Pattison!

Power BI Release May 2022 768x460.png

Check it out!

Click here to read more about the May 2022 updates!