The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
I have this data set. There are different types of pizzas. There is a column that is labeled ingredients. And each row lists all the ingredients for that pizza on one line. Example
bbq_ckn | The Barbecue Chicken Pizza | Chicken | Barbecued Chicken, Red Peppers, Green Peppers, Tomatoes, Red Onions, Barbecue Sauce |
However, I would like to seperate the ingredients so they show up on different rows. For example:
pizza_type_id | name | category | ingredients |
bbq_ckn | The Barbecue Chicken Pizza | Chicken | Barbecued Chicken |
bbq_ckn | The Barbecue Chicken Pizza | Chicken | Red Peppers |
bbq_ckn | The Barbecue Chicken Pizza | Chicken | Green Peppers |
bbq_ckn | The Barbecue Chicken Pizza | Chicken | Tomatoes |
bbq_ckn | The Barbecue Chicken Pizza | Chicken | Red Onion |
bbq_ckn | The Barbecue Chicken Pizza | Chicken | Barbecued Sauce |
I am new to Power Bi and DAX so any help would be greatly apprecaited!
Solved! Go to Solution.
Hi @mweber87 - There is a Split Column by Delimiter option in Power Query that will help. Please watch the following example: Power Query - Split a cell into rows | Get delimited lists into a usable format | Excel Off The Grid...
Many thanks
Daryl
Hi @mweber87 ,
check the column, go to the transform tab, choose "Split Column", use "Comma" as a delimiter, expand the Advanced options and select "Rows":
Imke Feldmann (The BIccountant)
If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!
How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries
Sound like you want to pivot on the new "ingredients"-column?
Not sure what you want to see in the columns with the ingredients actually?
Imke Feldmann (The BIccountant)
If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!
How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries
Hi @mweber87 ,
check the column, go to the transform tab, choose "Split Column", use "Comma" as a delimiter, expand the Advanced options and select "Rows":
Imke Feldmann (The BIccountant)
If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!
How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries
Yes thank you, @ImkeF that worked! Is there now a way for me to create a list for all the pizza's that use each ingredient?
Hi @mweber87 - There is a Split Column by Delimiter option in Power Query that will help. Please watch the following example: Power Query - Split a cell into rows | Get delimited lists into a usable format | Excel Off The Grid...
Many thanks
Daryl