I have a large and complicated Excel query, which works as desired.
However, I'm implementing some real-time data-validation features (i.e. not requiring a data refresh), and I need to have a regular excel formula in one of the columns of my query results.
This formula would perform a real-time data comparison using other sheets in the workbook, intentionally independent from the query itself.
Can I add a custom column with no value?
I assume the values null
or ""
would overwrite any pre-existing data, so I couldn't just enter the excel formula into the results table after running the query (the formula wouldn't persist between refreshes).
For testing, I tried adding a custom column with the value "=5+2"
, just to see how it would behave.
let
Source = Excel.CurrentWorkbook(){[Name="tblInvoicesCategorized"]}[Content],
/* ... perform numerous query actions ... */
// Use "=5+2" as a test formula
#"Added Custom13" = Table.AddColumn(#"Added Custom12", "Stale Data", each "=5+2"),
/* ... perform numerous query actions ... */
in
#"Changed Type"
The query did output the formula as the value of the cells in the column, but Excel did not automatically execute the formulas.
I still had to manually place the cursor into a cell and press enter, to get it to execute the formula.
Manual entry of the formula, or even manual execution of a macro, is undesirable for this workbook.
Is there a way for me to have a regular formula in this query column, and have it automatically persist between data refreshes?