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
| // Calculate luminosity based on hex value | |
| (HEX as text)=> | |
| let | |
| // Split strings into list by each character, convert to upper, remove hash | |
| Source = if HEX <> "" then Text.Upper(Text.AfterDelimiter(Text.From(HEX), "#")) else "#000000", | |
| // Split the Source by each character | |
| SplitHex = Splitter.SplitTextByRepeatedLengths(1)(Source), |
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
| (HEX as text)=> | |
| let | |
| // Split strings into list by each character, convert to upper, remove hash | |
| Source = if HEX <> "" then Text.Upper(Text.AfterDelimiter(Text.From(HEX), "#")) else "#000000", | |
| // Split the Source by each character | |
| SplitHex = Splitter.SplitTextByRepeatedLengths(1)(Source), | |
| GetHue = (hexlist)=> |
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
| // Calculate RGB based on hex value | |
| (HEX as text)=> | |
| let | |
| // Split strings into list by each character, convert to upper, remove hash | |
| Source = if HEX <> "" then Text.Upper(Text.AfterDelimiter(Text.From(HEX), "#")) else "#000000", | |
| // Split the Source by each character | |
| SplitHex = Splitter.SplitTextByRepeatedLengths(1)(Source), |
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 = Excel.CurrentWorkbook(){[Name = "Table2"]}[Content], | |
| #"Promoted Headers" = Table.PromoteHeaders(Source, [PromoteAllScalars = true]), | |
| #"Unpivoted Other Columns" = Table.UnpivotOtherColumns( | |
| #"Promoted Headers", | |
| {"Class"}, | |
| "Attribute", | |
| "Value" | |
| ), | |
| #"Extracted Text Before Delimiter" = Table.TransformColumns( |
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
| (HEX as text) => | |
| let | |
| // Split strings into list by each character, convert to upper, remove hash | |
| Source = if HEX <> "" then Text.Upper(Text.AfterDelimiter(Text.From(HEX), "#")) else "#000000", | |
| // Split the Source by each character | |
| SplitHex = Splitter.SplitTextByRepeatedLengths(1)(Source), | |
| GetColor = (hexlist) => | |
| let | |
| // Build the RGB list | |
| RGB = List.Combine({{"0" .. "9"}, {"A" .. "F"}}), |
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 = Excel.CurrentWorkbook(){[Name = "Table1"]}[Content], | |
| #"Added Coalesce" = Table.AddColumn(Source, "Coalesce", each [Column2] ?? [Column3] ?? [Column1]), | |
| #"Filtered Rows" = Table.SelectRows(#"Added Coalesce", each ([Coalesce] <> null)), | |
| #"Added Date" = Table.AddColumn( |
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
| // Calculate RGB based on hex value | |
| (HEX as text)=> | |
| let | |
| // Split strings into list by each character, convert to upper, remove hash | |
| Source = if HEX <> "" then Text.Upper(Text.AfterDelimiter(Text.From(HEX), "#")) else "#000000", | |
| // Split the Source by each character | |
| SplitHex = Splitter.SplitTextByRepeatedLengths(1)(Source), |
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
| // Structure CREATE TABLE syntax. | |
| SQL_CREATE_TABLE = LAMBDA(table_name,range, "CREATE TABLE " & table_name & " (" & CHAR(10) & REPT(" ", 5) & TEXTJOIN(", " & CHAR(10) & REPT(" ", 5), TRUE,BYROW(range,LAMBDA(r, TEXTJOIN(" ", TRUE,r)))) & CHAR(10) & ");") | |
| // Structure IN clause with numbers. | |
| SQL_IN_CLAUSE_NUM = LAMBDA(range,CONCAT("IN (",TEXTJOIN(", ",TRUE,range), ")")) | |
| // Structure IN clause with 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
| SVG := | |
| // If a color is in the dataset, make it red | |
| VAR _selected_color = "#FF0000" | |
| // If it is not, make it gray | |
| VAR _not_selected_color = "#A5A5A5" | |
| //Set up the SVG header | |
| VAR _header = "data:image/svg+xml;utf8,<svg width=""1280"" height=""720"" xmlns=""http://www.w3.org/2000/svg"" xmlns:xlink=""http://www.w3.org/1999/xlink"" overflow=""hidden""> |
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
| UK_SVG = | |
| // If a color is in the dataset, make it red | |
| VAR _selected_color = "#FF0000" | |
| // If it is not, make it gray | |
| VAR _not_selected_color = "#A5A5A5" | |
| //Set up the SVG header | |
| VAR _header = "data:image/svg+xml;utf8,<svg xmlns=""http://www.w3.org/2000/svg"" class=""hexmap-map"" version=""1.1"" overflow=""visible"" viewBox=""0 0 1746 1746"" style=""max-width:100%;"" preserveAspectRatio=""xMinYMin meet"" vector-effect=""non-scaling-stroke"" width=""1746"" height=""1746""> |
OlderNewer