Forum Discussion
Use Code from Formula Bar of One Conditional Column To create Other Conditional Columns
- 8 years ago
Hi drrai66,
Based on your requirement, you want to add multiple columns in one function, right?
To achieve your requirement, you can write a custom function like below:
Table.AddColumns = (table as table, addedColumns as list) as table =>
List.Accumulate(
addedColumns,
table,
(t, d) => Table.AddColumn(t, d{0}, d{1}, d{2}?))
The result is like below and you can refer to my PBIX file here:
https://www.dropbox.com/s/4b3hk747pju86h9/For%20drrai66.pbix?dl=0
Regards,
Jimmy Tao
Hi drrai66,
Based on your requirement, you want to add multiple columns in one function, right?
To achieve your requirement, you can write a custom function like below:
Table.AddColumns = (table as table, addedColumns as list) as table =>
List.Accumulate(
addedColumns,
table,
(t, d) => Table.AddColumn(t, d{0}, d{1}, d{2}?))
The result is like below and you can refer to my PBIX file here:
https://www.dropbox.com/s/4b3hk747pju86h9/For%20drrai66.pbix?dl=0
Regards,
Jimmy Tao