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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
faye_linturn
New Member

Formulas in a self referencing table

Hi, 

 

I have an issue where my excel formulas are always being overwritten when my query is refreshed. I know why this is happening, the columns are part of a self referencing table so the formula will always be overwritten with values.

 

So, when new rows are added the formula then does not populate down and I have to manually re add the fromula into excel (not in power query).

The formula is also not 'live'. One of the things I am looking at is days since - so how many days has an order been open (today()-order date=days open) but this does not recalculate. Today's value should be 1 but tomorrows value should be 2 etc. etc.

 

How can I get my formulas in a self referencing table to stay there and re-evaluate. I have heard of M code but at first galnce this is above my excel skills. 

I am unable to share the data as it confidential to my organisation. 

 

Thanks,

Faye

1 ACCEPTED SOLUTION
v-kkf-msft
Community Support
Community Support

Hi @faye_linturn ,

 

Please add the custom column in Power Query Editor.

 

= Duration.Days( DateTime.LocalNow() - [order date] )

vkkfmsft_0-1660726371615.png

 

If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
v-kkf-msft
Community Support
Community Support

Hi @faye_linturn ,

 

Please add the custom column in Power Query Editor.

 

= Duration.Days( DateTime.LocalNow() - [order date] )

vkkfmsft_0-1660726371615.png

 

If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Vijay_A_Verma
Super User
Super User

You need to save your result as a seperate table, you should not overwrite the input table with your result table.

Thanks for this. How would I do that? My self ref table is saved as a connection only, does this need to be saved as something different so it loads to a new tab? Then I just hide the tabs for the self ref tables so they can't be seen

If it is connection only, then no need.

But I am unable to understand the issue now. Probably some more details are needed about this self referencing table/query. 

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors