Hi,
This is just about general advice rather than a specific case, but when writing custom function,
when do I need to use the variables first and then let and when within the the let statement;
l
as opposed to somthing like this which pomotes the first two row to headers;
I'm looking more for general advice on how to write functions, a lot of videos show how to do a specific thing, so
if anyone knows of a good source of information, please pass it on.
Richard.
This is just about general advice rather than a specific case, but when writing custom function,
when do I need to use the variables first and then let and when within the the let statement;
l
Excel Formula:
let
RunningTotal = (Avlaue, Aindex) =>
List.Sum(
List.FirstN( Avlaue, Aindex )
)
in RunningTotal
as opposed to somthing like this which pomotes the first two row to headers;
Excel Formula:
(Rname as table )=>
let
Custom1 = List.Zip( {Table.ColumnNames(Rname) ,
List.Transform( Table.ToColumns( Table.FirstN( Rname,2)),(_)=> Text.Combine(_," ")) } ),
Custom2 = Table.RenameColumns( Table.RemoveFirstN(Rname,2),Custom1 )
in
Custom2
I'm looking more for general advice on how to write functions, a lot of videos show how to do a specific thing, so
if anyone knows of a good source of information, please pass it on.
Richard.