Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

Autofill formula columns for appended data

Hi everyone! Please help me, I have been searching and can't seem to find a solution. 

 

I have sales data that I've added custom columns using query editor. When I append a new month's sales data using "append queries" I find that the formulae in my custom columns have not extended to the freshly appended data. 

 

How can I extend this formula so that it will apply to new sales data that I append every month? 

 

Thank you so much! 

 

Regards,

Apple

  • Hi Anonymous,

     

     

    Power Query apply those transactions step by step. As you can see, "Added Custom" is a step before "Appended query", the custom column is only added to Table1, while Table2 keeps its original structure and values. That case, when you append them, custom columns only show in Table1, it won't be extended to the freshly appended data.

     

    For your requirement, you can append query first and then add custom column. You have to choose "Append queries as new".

     

    Each month, you loaded a new query into desktop, you just need to adjust the M code in Advanced Editor like below. The formula of custom column will be automatically applied to the freshly appended data.

     

    Best regards,

    Yuliana Gu

2 Replies

  • PattemManohar's avatar
    PattemManohar
    Icon for Community Champion rankCommunity Champion

    Anonymous Did you tried refreshing your data by clicking "Refresh" ? If not, please post a sample data to replicate your issue.

  • v-yulgu-msft's avatar
    v-yulgu-msft
    Icon for Microsoft Employee rankMicrosoft Employee

    Hi Anonymous,

     

     

    Power Query apply those transactions step by step. As you can see, "Added Custom" is a step before "Appended query", the custom column is only added to Table1, while Table2 keeps its original structure and values. That case, when you append them, custom columns only show in Table1, it won't be extended to the freshly appended data.

     

    For your requirement, you can append query first and then add custom column. You have to choose "Append queries as new".

     

    Each month, you loaded a new query into desktop, you just need to adjust the M code in Advanced Editor like below. The formula of custom column will be automatically applied to the freshly appended data.

     

    Best regards,

    Yuliana Gu