Forum Discussion
Anonymous
6 years agoNot applicable
How to create or merge specific columns based on other table instructions
I have "TableRAW" that contains many columns that start with "c" and a number. The rows may or may not have data for those c-numbers. I have a table "TableALIAS" that tells us there are 3 ...
artemus
Microsoft Employee
6 years agook... lets see if I can get this right:
= List.Accumulate(List.Distinct(TableALIAS[alias_name]), TableRAW, (current, next) =>
Table.CombineColumns(current, Table.SelectRows(TableALIAS, each next = [alias_name])[cnumber], List.Max, next))
I don't have your exact dataset schema, so hopefully this is close enough to what you want.
Note: This assumes that TableRAW has all the c columns that are in TableALIAS