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 | |
| fnParentChild = let | |
| func = | |
| (ParentChildTable as table, ParentColumnName as text, ChildColumnName as text) => | |
| let | |
| /* Debug Parameters | |
| ParentChildTable = PCTable_, | |
| ParentColumnName = "Parent_", | |
| ChildColumnName = "Child_", | |
| */ |
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 = (ModelJsonPath as text) => | |
| let | |
| // Helper function | |
| fnRemoveBetweenDelimiters = | |
| let | |
| func = ( | |
| TextToClean as text, | |
| StartDelimiter as text, |
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 = | |
| (SourceTable as table) => Table.RemoveColumns( | |
| SourceTable, | |
| { | |
| "FileSystemObjectType", | |
| "ServerRedirectedEmbedUri", | |
| "ServerRedirectedEmbedUrl", | |
| "ComplianceAssetId", | |
| "OData__UIVersionString", | |
| "GUID", |
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 = | |
| (probability as number, mean as number, standard_dev as number) as number => | |
| let | |
| // Source for NormalCDFInverse: https://www.johndcook.com/blog/normal_cdf_inverse/ | |
| //StdDev = 1.5, | |
| //Mean = 2, | |
| p = probability, | |
| RationalApproximation = (t as number) => | |
| [c = {2.515517, 0.802853, 0.010328}, d = {1.432788, 0.189269, 0.001308}, return |
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
| section MyGraphB; | |
| // | |
| // OAuth configuration settings | |
| // | |
| // TODO: set AAD client ID value in the client_id file | |
| client_id = Text.FromBinary(Extension.Contents("client_id")); | |
| client_secret = Text.FromBinary(Extension.Contents("client_secret")); | |
| redirect_uri = "https://oauth.powerbi.com/views/oauthredirect.html"; |
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
| DoublingTime = | |
| VAR CurrentDay = | |
| MAX(DailyData[Date] ) | |
| // Get half of todays value | |
| VAR ThresholdValue = | |
| CALCULATE(MAX ( DailyData[Confirmed] ), DailyData[Date] = CurrentDay ) / 2 | |
| // Get the day when the number of cases was half as much as today |
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 | |
| Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WcvL389AN0PXVNTRTitWJVnJ29NN18tF1NDQHc8GEhYVukK6js66hpVJsLAA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type text) meta [Serialized.Text = true]) in type table [product_name = _t]), | |
| #"Changed Type" = Table.TransformColumnTypes(Source,{{"product_name", type text}}), | |
| #"Added Custom" = Table.AddColumn(#"Changed Type", "Custom", each Text.TrimEnd([product_name], {"0".."9"} & {"-"})) | |
| in | |
| #"Added Custom" |
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 = | |
| (DateToTransform as date) as text => | |
| Text.From(Date.Year(DateToTransform)) | |
| & Text.PadStart(Text.From(Date.Month(DateToTransform)),2,"0") | |
| & Text.PadStart(Text.From(Date.Day(DateToTransform)),2,"0") , | |
| documentation = [ | |
| Documentation.Name = " Date.ToDateKey ", | |
| Documentation.Description = " Transforms and converts a <code>date</code> field to YYYYMMDD - text field. ", | |
| Documentation.LongDescription = " Transforms and converts a <code>date</code> field to YYYYMMDD - text field. ", |
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] ), |
NewerOlder