This file contains 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 = | |
(function as function) => | |
let | |
function_ = function, | |
Metadata = (functionType) as record => | |
let | |
Help = Value.Metadata(if functionType is type then functionType else Value.Type(functionType)) | |
in | |
Help, |
This file contains 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
(Table as table, Parent as text, Child as text, Qty as text) => | |
let | |
/* Debug parameters | |
Table = tblBOM, | |
Parent = "ProductAssemblyID", | |
Child = "ComponentID", | |
Qty = "PerAssemblyQty", | |
*/ |
This file contains 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 = | |
(ZIPFile_path as text) => | |
let | |
Header = BinaryFormat.Record([ | |
MiscHeader = BinaryFormat.Binary(14), | |
BinarySize = BinaryFormat.ByteOrder(BinaryFormat.UnsignedInteger32, ByteOrder.LittleEndian), | |
FileSize = BinaryFormat.ByteOrder(BinaryFormat.UnsignedInteger32, ByteOrder.LittleEndian), | |
FileNameLen= BinaryFormat.ByteOrder(BinaryFormat.UnsignedInteger16, ByteOrder.LittleEndian), | |
ExtrasLen = BinaryFormat.ByteOrder(BinaryFormat.UnsignedInteger16, ByteOrder.LittleEndian) | |
]), |
This file contains 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 = | |
(String as text, optional Delimiter as text) as text => | |
let | |
delimiter = if Delimiter = null then " " else Delimiter, | |
TextToList = List.Buffer(Text.Split(String, delimiter)), | |
FilterList = List.Select(TextToList, each _ <> ""), | |
Result = Text.Combine(FilterList, delimiter) | |
in | |
Result | |
, documentation = [ |
This file contains 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 | |
// ----------------------- Documentation ----------------------- | |
documentation_ = [ | |
Documentation.Name = " Dates.ListDateIntervals | |
", Documentation.Description = " Creates a list of dates according to the chosen interval between Start and End. Allowed values for 3rd parameter: ""Year"", ""Quarter"", ""Month"", ""Week"" or ""Day"". | |
" , Documentation.LongDescription = " Creates a list of dates according to the chosen interval between Start and End. The dates created will always be at the end of the interval, so could be in the future if today is chosen. | |
", Documentation.Category = " Table | |
", Documentation.Source = " http://www.thebiccountant.com/2017/12/11/date-datesbetween-retrieve-dates-between-2-dates-power-bi-power-query/ . | |
", Documentation.Author = " Imke Feldmann: www.TheBIccountant.com . | |
", Documentation.Examples = {[Description = " see http://www.thebiccountant.com/2017/12/11/date-datesbetween-retrieve-dates-between-2-dates-power-bi-power-query/ . |
This file contains 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 = | |
(ParChTable as table, | |
ChildKey as text, | |
ParentKey as text, | |
LevelColumnName as text) => | |
let | |
/*//Debug Parameters | |
ParChTable = Nodes0, |
This file contains 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
// Removes all duplicate separators within a string. If optional "TrimEnds" is set to "yes" the (single remaining) separators will be removed from the start and end as well. | |
(MyText as text, Separator as text, optional TrimEnds as text) as text => | |
let | |
TransformTextToList = List.Buffer(Text.ToList(MyText)), | |
Result = List.Accumulate(TransformTextToList, // List that will be iterated through | |
"", // a starting value (if necessary, here we leave it blank) | |
(resultSoFar, current) => if Text.End(resultSoFar,1) = Separator and current = Separator then resultSoFar else resultSoFar¤t // operation that will be performed at each iteration-step | |
), | |
TrimEnd = if TrimEnds = "yes" then Text.TrimStart(Text.TrimEnd(Result, Separator), Separator) else Result |
This file contains 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 = | |
(TableColumn as list, optional SourceNameColumn as list) => | |
let | |
AddIDs = | |
if | |
SourceNameColumn=null | |
then | |
TableColumn | |
else | |
let |
This file contains 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 = | |
(SqlExpression as text) => | |
let | |
Source = Expression.Evaluate(SqlExpression.ToExpression(SqlExpression, #shared), #shared) (#shared) | |
in | |
Source | |
, documentation = [ | |
Documentation.Name = " Syntax.UseSQL | |
", Documentation.Description = " Use SQL-statement to query your M-tables (!!!) in your current file. |