Forum Discussion
Anonymous
5 years agoNot applicable
Splitting columns based on data from another column
Hi all, I have data that looks something like this: Product Number A 1 A 2 A 3 A 4 B 1 B 2 B 3 How do I manipulate or split the columns so it looks someth...
- 5 years ago
Anonymous , Create two new columns like
Number 1= if([Product]= "A", [Number], blank())
Number 2= if([Product]= "B", [Number], blank())
DavisBI
5 years agoSolution Specialist
Hi, Anonymous ,
You can declare a function in the powerquery editor. The product number can be used as a parameter, and then the new column will be renamed every time the parameter is passed. In this way, when the function is called, due to the different column names, new columns can be added automatically.
I can do a demo if you're not clear about that.
Best.
- Anonymous5 years agoNot applicable
Hi sorry but I am new to Power BI. Mind doing a demo if you are willing to? Thank you very much