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 | |
| // ----------------------- 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 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 = (JSON) => | |
| let | |
| Source = JSON, | |
| ParseJSON = try Json.Document(Source) otherwise Source, | |
| TransformForTable = | |
| if Value.Is(ParseJSON, type record) then | |
| Record.ToTable(ParseJSON) | |
| else | |
| #table( |
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 = | |
| (TypeAsText as text) => | |
| Record.Field( | |
| [type null = Expression.Evaluate( "type null", [ type null = type null] ), | |
| type logical = Expression.Evaluate( "type logical", [ type logical = type logical] ), | |
| type number = Expression.Evaluate( "type number", [ type number = type number] ), | |
| Int64.Type = Expression.Evaluate( "Int64.Type", [ Int64.Type = Int64.Type] ), | |
| type time = Expression.Evaluate( "type time", [ type time = type time] ), | |
| type date = Expression.Evaluate( "type date", [ type date = type date] ), | |
| type datetime = Expression.Evaluate( "type datetime", [ type datetime = type datetime] ), |
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 = | |
| (ParChTable as table, | |
| ChildKey as text, | |
| ParentKey as text, | |
| LevelColumnName as text) => | |
| //*/ | |
| let |
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 = | |
| (FileOrFolderPath as text) => | |
| let | |
| CreateTable = if Text.End(FileOrFolderPath,5) = ".xlsx" or Text.End(FileOrFolderPath,5) = ".xlsm" | |
| then #table({"Content", "Name"}, {{File.Contents(FileOrFolderPath), FileOrFolderPath}}) | |
| else Folder.Files(FileOrFolderPath) , | |
| FetchQueries = Table.AddColumn(CreateTable, "FetchQueries", each try fnFetchQueries([Content]) otherwise #table({"Column1"}, {{null}})), | |
| #"Removed Other Columns" = Table.SelectColumns(FetchQueries,{"Name", "FetchQueries"}), |
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 = | |
| (data as text) as text => | |
| let | |
| DecodedText = Uri.Parts("http://contoso?a=" & data)[Query][a] | |
| in | |
| DecodedText , | |
| documentation = [ | |
| Documentation.Name = " Uri.UnescapeDataString ", | |
| Documentation.Description = " Decodes special characters in the input data according to the rules of RFC 3986. ", | |
| Documentation.LongDescription = " Decodes special characters in the input data according to the rules of RFC 3986. ", |
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 = | |
| (ParChTable as table, | |
| ChildKey as text, | |
| ParentKey as text, | |
| LevelColumnName as text) => | |
| let | |
| /*//Debug Parameters | |
| ParChTable = Nodes0, |
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 = [ |
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
| (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 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 = | |
| (t as table, optional maxSample as number) => | |
| let | |
| primitiveTypes = (t as table, optional maxSample as number) as table => | |
| let | |
| Table = t, | |
| MaxSample = maxSample, | |
| Sample = if maxSample = null then Table.FirstN(Table,10) else Table.FirstN(Table,Number.From(maxSample)), | |
| Columns = Table.ToColumns(Sample), |
NewerOlder