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

Did you hear? There's a new SQL AI Developer certification (DP-800). Start preparing now and be one of the first to get certified. Register now

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
Most Valuable Professional
Most Valuable Professional

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

Vijay_A_Verma
Most Valuable Professional
Most Valuable Professional

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
April Power BI Update Carousel

Power BI Monthly Update - April 2026

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

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Top Solution Authors