Created
April 26, 2019 19:04
-
-
Save ImkeF/4ec90606617eb5a48e78e2ec02e7bdb8 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let func = | |
(MyTable as table, MyColumnName as text) => | |
let | |
Source = MyTable, | |
ShiftedList = {null} & List.RemoveLastN(Table.Column(Source, MyColumnName),1), | |
Custom1 = Table.ToColumns(Source) & {ShiftedList}, | |
Custom2 = Table.FromColumns(Custom1, Table.ColumnNames(Source) & {"Previous Row"}) | |
in | |
Custom2 , | |
documentation = [ | |
Documentation.Name = " Table.PreviousRow ", | |
Documentation.Description = " Superfast way to reference previous row ", | |
Documentation.LongDescription = " Superfast way to reference previous row ", | |
Documentation.Category = " Table ", | |
Documentation.Source = " www.TheBIccountant.com . http://tiny.cc/hhus5y . ", | |
Documentation.Version = " 1.0 ", | |
Documentation.Author = " Imke Feldmann: www.TheBIccountant.com. http://tiny.cc/hhus5y . ", | |
Documentation.Examples = {[Description = " ", | |
Code = " ", | |
Result = " "]}] | |
in | |
Value.ReplaceType(func, Value.ReplaceMetadata(Value.Type(func), documentation)) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment