Getting List Of Columns/Inline Function help

Nick Burns

Member
Joined
May 24, 2017
Messages
162
Reaction score
0
Points
16
Excel Version(s)
Office 365
So I have the following M-Code that gets the list of columns names before a column name:

Code:
= List.FirstN(Table.ColumnNames(MoveTotalGross),List.PositionOf(Table.ColumnNames(MoveTotalGross),"SatRegHours"))
In this example, I get all column names before "SatRegHours"

I know how to make this a standalone function, but I'm trying to grasp how to construct inline functions.

How would the above be rewritten so that I only have to list the previous step (MoveTotalGross) once with "stop at" column name ("SatRegHours")?
 
Back
Top