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 fnCreateDimID = | |
(fact as table, col_name as text)=> | |
let | |
fnCreateDim = (fact as table, col_name as text)=> | |
let | |
removed_cols = Table.SelectColumns(fact,{col_name}), | |
dedupe = Table.Distinct(removed_cols), | |
sorted = Table.Sort(dedupe,{{col_name, Order.Ascending}}), |
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 fnCreateDimTables = | |
(t as table, optional exclusions as list) => | |
let | |
// Get the schema for the table | |
Schema = Table.Schema(t), | |
// Select the text columns | |
AllTextCols = Table.SelectRows(Schema, each _[Kind] = "text")[Name], |