Forum Discussion

dbooksta's avatar
dbooksta
New Member
3 years ago
Solved

Including Excel formulas in custom columns

I am using Power Query to get data from a CSV into an Excel table.  I want to insert various columns that have Excel formulas in them.  If I do this in the Excel table then when I refresh the data so...
  • KT_Bsmart2gethe's avatar
    KT_Bsmart2gethe
    3 years ago

    Hi dbooksta ,

     

    When you import data in PQ, PQ purely loads whatever data you have. One thing PQ doesn't like is #N/A, #REF!, etc. I am referring to source data. Once data is imported, you can load the data into excel, and then apply the add-in function - LastPrice(), but don't add it between columns in the loaded table. Instead, you can add columns at the end of the table and apply the add-in function.

     

    Please note that LastPrice() is an add-in for excel (I assumed it is a VBA custom function) not for PQ, so the solution is to replicate the formula in PQ, providing we know the logic of LastPrice(), then we should be able to replicate it.

     

    I hope the explanation is clear.

     

     

    Regards

    KT