Column name in formula


I am trying to have a lookup where one of the conditions is the column name. How do I set that up?

I have one table where all my inventory movement is being recorded (Stock Tracker). I am trying to set up another table (Balances) which will calculate balances of each inventory item at each location. So I want to plug in the location (column header) in the lookup formula. It works when hardcoded, but ideally I want it to be a formula if possible.

Thank you for the help!


There isn’t a supported way to get the ID of the current column, but there is a hacky way that happens to work today:


The downside is that it peeks into the internals of the data engine, so there is no guarantee it will continue working in future versions of the code.

That works, thank you!