Add fExtractAndRename function and create fIfBlank file

This commit is contained in:
2025-11-14 23:45:19 +03:00
parent 0789260733
commit 02b4d94990
2 changed files with 16 additions and 0 deletions

View File

@@ -0,0 +1,16 @@
let
ExpandAndRename = (tTarget as table,
sDataColumnName as text,
sTagString as text) as table =>
let
tagString = sTagString,
tableSubstition = try Table.SelectRows(fP("RENAMING_RULES"), each ([#"#"] = tagString)) otherwise error "No substitutions provided",
extractedColumnNames = try Table.Column(tableSubstition, Table.ColumnNames(tableSubstition){0}) otherwise error "Bad column list",
newColumnNames = try Table.Column(tableSubstition, Table.ColumnNames(tableSubstition){1}) otherwise error "Bad column list",
ExpandData = Table.ExpandTableColumn(tTarget, sDataColumnName, extractedColumnNames, newColumnNames)
in
ExpandData
in
ExpandAndRename

0
power-query/fIfBlank Normal file
View File